Linux
Top 20 Essential Vim commands
A quick reference to Vim commands for editing, navigation, saving, and quitting.
0 views
:w- Save the current file.:q- Quit Vim.:wq- Save and quit.:q!- Quit without saving.i- Enter insert mode before the cursor.a- Enter insert mode after the cursor.o- Open a new line below and enter insert mode.O- Open a new line above and enter insert mode.dd- Delete the current line.yy- Yank (copy) the current line.p- Paste after the cursor.P- Paste before the cursor.u- Undo the last change.Ctrl+r- Redo the last undone change./- Search forward for a pattern.?- Search backward for a pattern.n- Repeat the last search in the same direction.N- Repeat the last search in the opposite direction.:s- Substitute text in the current line.gg- Go to the first line of the file.