Leader key is by default
:h keyword
- Bring up help for keywordsav file
- Save the current file as another filenameclo
- Close the current paneter
- Open a terminal windowESC
- Return to Normal mode:w
- Save:q
- Quit:q!
- Quit don't save:wqa
- Save and quit cloing all tabs
h(left)
,j(down)
,k(up)
,l(right)
- Move around the screengg
- Move to top of bufferG
- Move to bottom of fileH
- Top of screenM
- Middle of screenL
- Bottom of the screenw
- Jump forward to start of worde
- Jump forward to end of wordb
- Jump backwards to start of word%
- Jump forward to matching parenthesis or brace.0
- Start of line$
- End of line^
- First non blank character of linef(char)
- Move to the next occurrence of characterF(char)
- Move to the previous occurrence of character;
- Repeat last f or F,
- Repeat last f or F backwards{
,}
- Move around paragraph blocks (works in code too)ctrl + e
- Move screen down one line without moving cursorctrl + y
- Move screen up one line without moving cursorctrl + b
- Move back one full screenctrl + f
- Move forward one full screenctrl + d
- Move forward 1/2 screenctrl + u
- Move back one full screen
i
- Enter insert mode before cursorI
- Enter insert mode at the start of the linea
- Enter insert mode after cursorA
- Enter insert mode at the end of the lineo
- Append a line below current lineO
- Append a line above current lineea
- Enter insert mode at the end of the wordctrl + rX
- Insert the contents of register X
r
- Replace single characterJ
- Join line below to current onegwip
- Reflow paragraphg~
- switch case up to motiongu
- Lower case up to motiongU
- Upper case up to motion.cc
- Replace entire lineC
orc$
- Replace to end of line.ciw
- Change entire wordcw
- Replace to end of wordu
- UndoU
- Redo.
- Repeat last command
v
- Visual modeV
- Start linewise visual mode (select lines)o
- Move to other end of marked area.Ctrl + v
- Visual Block modeCtrl + O
- Other corner of blockaw
- Mark a wordab
- Mark block with ()aB
- Mark block with {}ib
- Mark inner block with ()iB
- Mark inner block with {}at
- Mark tags with <>
>
- Shift text right<
- Shift text lefty
- Yank marked textd
- Delete marked text~
- Switch caseu
- Change case to lowercaseU
- Change case to uppercase
:reg
- Show register content"xy
- Yank into register x"xp
- Paste contents of register x"+y
- Yank into system clipboard"+p
- Paste from system clipboard
:marks
- Lists all marksma
- Set position of mark a- `a - Jump back to a
- `. - Go to position when last editing the file
- `` - Go to position before last jump
:ju
- List of jumpsctrl + i
- Newer position in jump listctrl + o
- Older position in jump list:changes
- List changesg,
- Go to newer changeg;
- Go to older change
qa
- Record macro aq
- Stop recording macro@a
- Run macro a@@
- rerun last macro
yy
- Yank lineyw
- Yank wordy$
- Yank to end of linep
- Paste clipboard after cursorP
- Paste clipboard before cursordd
- Delete linedw
- Delete word (from current cursor to next start of word)d$
- Delete till end of linex
- Delete character
<<
- Move line left>>
- Move line right>%
- Indent block (when on brace or paren)=%
- Re-indent block
/pattern
- Search for pattern?pattern
- Search backwards for patternn
- Repeat search in same directionN
- Repeat search in opposite direction:%s/old/new/g
- Replace all old with new throughout the file:%s/old/new/gc
- Replace all old with new throughout the file with confirmations:noh
- Remove highlighting of search matches:vimgrep /pattern/ **/*
- Search for pattern in all files:cn
- Next match:cp
- Prev match:cope
- List of all matches found:ccl
- Close list of all matches
:tabnew [file]
- Open file in new tabCtrl + wT
- Move current split window into its own tabgt
- Go to next tabgT
- Go to prev tab#gt
- Go to tab number:tabc
- Close current tab:tabo
- Close other tabs but this one.
:e file
- Edit file in a new buffer:bn
- Next buffer:bp
- Prev buffer:bd
- Close buffer:ls
- List open buffers
:sp file
- Open file in new buffer and split:vs file
- Open file in new buffer and split (vertical):tab ba
- Open all buffers as tabsctrl + ws
- Split windowctrl + wv
- Split window verticalctrl + ww
- Switch windowctrl + wq
- Quit windowctrl + wx
- Exchange window with next onectrl + w=
- Make all windows equal height and widthctrl + wh
- Move to left windowctrl + wl
- Move to right windowctrl + wj
- Move to below windowctrl + wk
- Move to above window
leader + fb
- Buffersleader + ff
- Find fileleader + fg
- Live grepleader + fh
- Help tags
leader + n
- Toggle file treea
- Add new file (or folder if you leave a / at end)r
- Rename filed
- Delete file or foldery
- Copy file name to system clipboardY
- Copy relative path to system clipboardgy
- Copy absolute path to system clipboardx
- Cut filep
- Paste file from clipboardctrl + v
- Open in vert splitctrl + x
- Open in horizontal splittab
- Open file but stay in tree (preview)R
- Refresh treeI
- Toggle hidden folders visibilityH
- Toggle dot files visibility
F2
- RenameLeader + R
- RenameLeader + r
- ReferencesLeader + D
- Go to definitionLeader + I
- Go to implementationLeader + e
- Show document diagnosticsLeader + E
- Show workspace diagnosticsLeader + f
- Format bufferLeader + k
- Signature helpLeader + K
- Hover textLeader + a
- Do code action
F5
- RunF10
- Step overF11
- Step intoF12
- Step out<leader> + b
- Set break pointF9
- Open debug repl<leader> + d
- All dap commands<leader> + B
- List break points<leader> + dv
- List variables<leader> + df
- List frames
<leader> + t
- Run whole test suite<leader> + tn
<leader>~
- Open new floating terminal<leader>~j
- Next floating terminal<leader>~k
- Prev floating terminal<escape>
- Close terminal