NeoVim Cheat Sheet
COMMAND
DESCRIPTION
- |nvim file|Open file in Neovim.
- |:q|Quit.
- |:q!|Quit without saving.
- |:w|Write file.
- |:wq|Write and quit.
- |:x|Write and quit if changed.
- |ZZ|Save and quit.
- |ZQ|Quit without saving.
- |i|Insert mode.
- |a|Append after cursor.
- |o|New line below.
- |Esc|Normal mode.
- |h j k l|Cursor movement.
- |w|Next word.
- |b|Previous word.
- |0|Start of line.
- |$|End of line.
- |gg|Go to top of file.
- |G|Go to bottom of file.
- |Ctrl-f|Page down.
- |Ctrl-b|Page up.
- |dd|Delete line.
- |yy|Yank line.
- |p|Paste after cursor.
- |u|Undo.
- |Ctrl-r|Redo.
- |/text|Search forward.
- |?text|Search backward.
- |:grep pattern|Search all files in buffer.
- |n|Next match.
- |N|Previous match.
- |:noh|Clear search highlight.
- |:%s/a/b/g|Replace in file.
- |v|Visual mode.
- |V|Visual line mode.
- |Ctrl-v|Visual block mode.
- |:split|Horizontal split.
- |:vsplit|Vertical split.
- |Ctrl-w w|Switch window.
- |:e file|Edit file.
- |:e!|Reload file from disk.
- |:bd|Close buffer.
- |:ls|List buffers.
- |:b num|Go to file in buffer by number.
- |:b#|Go to previous file in buffer.
- |Ctrl-o|Go cursor-position of older file.
- |Ctrl-i|Go cursor-position of newer file.
- |:help|Open help.
- |:checkhealth|Neovim diagnostics.