Linux – Vim file editor cheat sheet

How to navigate in a Linux file editor VI, pasting a cheat sheet. There are many more options but this is all i usually need to maneuver around.

:wqSave file and quit
:q!Exit without saving
:set nuDisplay line numbers
:nMove cursor to line n
GMove cursor to end of file
ggMove cursor to the first line
/Search forward
?Search backwards
nSearch for next instance of a string
NSearch for previous instance of a string
uUndo last change
UUndo last change to line
ddCut the entire line or (delete a line)
yyCopy the entire line
yCopy selection
pPaste the line
This entry was posted in Linux and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *