Professional Documents
Culture Documents
Move Commands
Move Commands
Move Commands
Below are some useful cheat sheet commands for vi to speed up text editing:
Move commands
$ 0 G 1G h l k j w W b B H M L CTRL+f CTRL+b CTRL+d CTRL+u cw r R C cc
move move move move move move move move move move move move move move move move move move move to end of line to beginning of line to last line of file to first line of file cursor left cursor right cursor up cursor down to next word to next blank delimited word to beginning of the word to beginning of blank delimited word to top of the screen to middle of the screen to bottom of the screen screen down one page screen up one page screen down 1/2 a page screen up 1/2 a page word letter until [esc] is pressed to the end of the line the entire line
File commands
- quit and save - save - quit without saving
Search Commands
/string ?string n N ~ J . u U
Search Search Search Search forward for string backward for string for next instance of string for previous instance of string
other commands
- toggle between upper and lower case - join lines - repeat last text-changing command - undo last change - undo all changes to line