AppVim › macOS

Vim macOS Shortcuts

60 shortcuts · View all OS →

WindowsmacOSLinuxCompare all
ActionmacOS Shortcut
Modes
Enter Normal modeEsc
Enter Insert modei
Insert at end of lineA
Insert on new line belowo
Insert on new line aboveO
Enter Visual modev
Enter Visual Line modeV
Enter Visual Block modeCtrl+V
Enter Command-line mode:
Replace single characterr
Replace mode (overwrite)R
Navigation
Move left/down/up/righth/j/k/l
Next / previous wordw/b
End of worde
Start of line (non-blank)^
End of line$
First line of filegg
Last line of fileG
Go to line N:NorNgg
Half page down/upCtrl+D/Ctrl+U
Jump to matching bracket%
Jump to next/prev occurrence of charf{char}/F{char}
Center view on cursorzz
Editing
Delete characterx
Delete linedd
Delete worddw
Delete to end of lineD
Yank (copy) lineyy
Yank wordyw
Paste after / before cursorp/P
Change wordcw
Change to end of lineC
Change entire linecc
Undou
RedoCtrl+R
Repeat last change.
Indent / unindent line>>/<<
Auto-indent selection=G(fromtop)
Search & Replace
Search forward/{pattern}
Search backward?{pattern}
Next / previous matchn/N
Search word under cursor*/#
Replace in line:s/old/new/
Replace all in file:%s/old/new/g
Replace with confirmation:%s/old/new/gc
Clear search highlight:noh
File & Buffers
Save file:w
Save and quit:wq
Quit without saving:q!
Open file:e{file}
List buffers:ls
Next / previous buffer:bn/:bp
Split horizontally:sp
Split vertically:vsp
Navigate splitsCtrl+Whjkl
Macros
Record macro into registerq{letter}
Stop recordingq
Play macro@{letter}
Repeat last macro@@
Run macro N timesN@{letter}