Common Vim Commands for Server Side Developement Nov 28, 2008
Vim Commands
Open a File. vim filename
Start Writing: shift+i
Stop Writing: escape
Exit and Save: shift+zz
Exit and Save: :w!
Start Writing at the Beginning of a Line: shift+i
Start Writing as the End of a Line: shift+a
Move Cursor to End of Line: $
Jump to a Line Number: line number then shift+g
Delete a Line: dd Delete Multiple Lines: number of lines then dd
Delete the Character Beneath the Cursor: x Delete Multiple Characters number of characters then x
Save a File and Continue Editing :w!
Search and Replace First Instance on Each Line :g/find/s//replace/
Search and Replace all Instances on Each Line :g/find/s//replace/g
Search and Replace all Instances on Each Line with Confirmation :g/find/s//replace/gc Join the Line Beneath this Line to This Line J Page 1 of 1 |