4.4 KiB
4.4 KiB
Neovim Cheatsheet
Modes
i- Insert mode (start typing)v- Visual mode (select text)V- Visual line mode (select full lines)Ctrl+v- Visual block mode (select columns)EscorCtrl+[- Return to Normal mode:- Command mode
Basic Navigation
hjkl- Left, Down, Up, Rightw- Jump forward to start of wordb- Jump backward to start of worde- Jump to end of word0- Jump to start of line^- Jump to first non-blank character$- Jump to end of linegg- Go to top of fileG- Go to bottom of file{number}G- Go to line number (e.g.,42G)Ctrl+d- Scroll down half pageCtrl+u- Scroll up half pageCtrl+f- Scroll down full pageCtrl+b- Scroll up full page%- Jump to matching bracket/parenthesis
Editing
i- Insert before cursora- Insert after cursorI- Insert at start of lineA- Insert at end of lineo- Open new line belowO- Open new line abovex- Delete character under cursordd- Delete current linedw- Delete wordd$orD- Delete to end of lined0- Delete to start of linecc- Change entire line (delete and enter insert mode)cw- Change wordu- UndoCtrl+r- Redoyy- Yank (copy) current lineyw- Yank wordy$- Yank to end of linep- Paste after cursorP- Paste before cursorr{char}- Replace single character.- Repeat last command
Visual Mode
v- Start visual modeV- Start visual line modeCtrl+v- Start visual block modey- Yank (copy) selectiond- Delete selectionc- Change selection>- Indent selection<- Unindent selection~- Toggle case
Search & Replace
/pattern- Search forward?pattern- Search backwardn- Next search resultN- Previous search result*- Search for word under cursor:%s/old/new/g- Replace all occurrences in file:%s/old/new/gc- Replace with confirmation:noh- Clear search highlighting
File Operations
:w- Save file:q- Quit:wqor:x- Save and quit:q!- Quit without saving:e filename- Open file:bn- Next buffer:bp- Previous buffer:bd- Close buffer
Window Management
:spor:split- Split horizontally:vspor:vsplit- Split verticallyCtrl+w h/j/k/l- Navigate between windowsCtrl+w w- Cycle through windowsCtrl+w q- Close current windowCtrl+w =- Make windows equal sizeCtrl+w _- Maximize heightCtrl+w |- Maximize width
Custom Keybindings
Based on your config with <leader> = Space
File Explorer
Space+e- Toggle NvimTree file explorer
Fuzzy Finder (Telescope)
Space+ff- Find filesSpace+fg- Live grep (search in files)Space+fb- Find buffers
Window Navigation
Ctrl+h- Move to left windowCtrl+j- Move to down windowCtrl+k- Move to up windowCtrl+l- Move to right window
Quick Actions
Space+w- Save fileSpace+q- Quit
Autocompletion
Ctrl+Space- Trigger completionEnter- Confirm completionTab- Next completion itemShift+Tab- Previous completion item
Useful Tips
- Repeat actions: Number before command (e.g.,
5dddeletes 5 lines) - Combine motions:
d3wdeletes 3 words,y2jyanks 2 lines down - Inside/Around:
ci"change inside quotes,da(delete around parentheses - Jump to character:
f{char}jump forward to char,F{char}jump backward ;repeat last f/F/t/T,,repeat in opposite direction- Macros:
q{letter}start recording to registerqstop recording@{letter}play macro@@replay last macro
Command Line Tricks
:!command- Run shell command:r !command- Insert command output:%!command- Filter file through command:term- Open terminal in vim
Marks & Jumps
m{letter}- Set mark'{letter}- Jump to mark''- Jump back to previous positionCtrl+o- Jump to older positionCtrl+i- Jump to newer position
Pro Tips
- Use
.to repeat your last change - super powerful! - Learn to use
ci",ci',ci(,ci{to change inside quotes/brackets - Combine counts with motions:
3w,5j,2dd - Use relative line numbers (you have this enabled!) with counts:
5jto jump 5 lines down - System clipboard integration: Just yank normally with
y- it copies to system clipboard! (You haveclipboard=unnamedplusset)
Last updated: November 2025