-
Notifications
You must be signed in to change notification settings - Fork 5
Lecture 03b
fluf1024 edited this page Oct 10, 2013
·
31 revisions
Keep your hands on keyboard!
Touching story ...
Everything is far better than notepad ...
Quick review from easy to most geek one ...
Who remembers old PSPad?
For Mac hipsters.
- Awesome IDE
- About 90 € for comercial license
- Free for running opensource projects
- Great compromise
- Many awesome keyboard shortcuts (Ctrl + P)
- Pros
- Pretty geek
- Pretty fast
- Keep your hands on keyboard
- Work directly on server
- Cons
- Learning curve
- Features
- Code completion
Start
Vim has 3 modes:
- Command mode (Esc)
- Input mode (i)
- Visual mode (v)
Most important commands
- :q! - Get me out of here!
- :w - Save changes!
- ZZ - Save changes and get me out of here!
- Movement
- h,l - left, right
- j,k - down, up
- w - jump to next word
- gg - jump to the begining of the file
- G - jump to the end of the file
- ^ - jump to the begening of the line
- $ - jump to the end of the line
- Editing
- d[movement command] - delete
- dd - delete line
- D - delete from cursor to end of line
- c[movement command] - delete and start editing
- C - delete from cursor to end of line and start editing
- r - change one character
- o/O - new line after/before this line
- Files
- Ctrl + P - open file
- Find
- Use '/' and start typing text
- Use Enter to jump to found text
- Use n/N to switch to next/previous text
- Replace
- Write :%s/regexp-to-find/pattern-to-replace/g
- s - search and replace
- g - do it globally for whole file
- Copy + Paste
- Start Visual mode (v)
- Select desired text using movement keys
- Use 'd' to delete text, or 'y' to copy (yank) text
- Use p/P to insert yanked text after/before cursor
Must have features:
- Janus
- Vim Adventures - perfect game for boring lectures
- Vim Ouliner
- Vrome - vim-like extension for chrome
- Someone asked about realtime VIM game
- VIM Sandbox - try Vim in web browser (with a lot of helpful information)
- Google docs - for supergeeks, edit Google docs with Vim
Tabs in linux console.
Why?
- Everything is save if you loose connection.
- You can have only one ssh/putty window opened.
- Use SSH Keys - they are awesome! (especially for github)
Awesome and pretty configurable shell. If you hate configs try oh-my-zsh. Or I can provide you my .zshrc config file.
Great and easy shell. No need to configure anything! Just try it!
require 'pp'
a = {:ahoj => 1, :neco => 2}
pp a
Let's move to pry.
Interactive ruby console.
require 'pry'
a = 'hello'
binding.pry
puts a
- Till thursday
- Have Vim with Janus installed
- If you have any problem with installation process, or any other question, please contact me [email protected]