My commonly used vi commands.
Moje často používané príkazy.
dd | Delete current line |
---|---|
v mark lines d | Delete marked text - v start visual mode, mark lines with shift+arrow keys, then do command d |
/string | Search forward for string |
?string | Search back for string |
n | Search for next instance of string |
N | Search for previous instance of string |
:s/pattern/string/flags | Replace pattern with string according to flags. g flag replace all occurences of pattern, c confirm replaces, & repeat last :s command. |
:$ | Move to last line |
:30 | Move to line 30 |
:wq | Save and Quit |
:q! | Quits without saving |
:e file | Edit file |
:n | Go to next file |
:p | Go to previos file |
Full VI Cheat Sheets - References
http://www.lagmonster.org/docs/vi2.htmlhttp://www.worldtimzone.com/res/vi.html
Komentáre
http://ubuntulife.files.wordpress.com/2008/03/vi-vim_cheat_sheet.gif