Neovim Keyboard Shortcuts Cheat Sheet

Editor

Neovim Keyboard Shortcuts Cheat Sheet

Important: shortcuts marked as configuration-dependent are not universal. Run :map, :nmap, :imap, :vmap and :Telescope keymaps inside Neovim to inspect your active mappings.

Notation

SymbolDescription
<C-x>Ctrl + x
<A-x>Alt + x
<S-x>Shift + x
<CR>Enter
<Esc>Escape
<leader>Leader key, commonly Space

1. Modes

ShortcutDescription
iInsert before cursor
IInsert at beginning of line
aInsert after cursor
AInsert at end of line
oOpen line below
OOpen line above
vVisual character mode
VVisual line mode
<C-v>Visual block mode
:Command-line mode
<Esc>Return to Normal mode

2. Basic movement

ShortcutDescription
hMove left
jMove down
kMove up
lMove right
wNext word beginning
WNext WORD beginning
bPrevious word beginning
BPrevious WORD beginning
eEnd of word
0Beginning of line
^First non-blank character
$End of line
ggFirst line of file
GLast line of file
{number}GGo to line number
%Jump to matching bracket
f{char}Find character forward
F{char}Find character backward
t{char}Move before character
;Repeat last f, F, t or T
,Repeat in opposite direction
<C-d>Half-page down
<C-u>Half-page up
<C-f>Page down
<C-b>Page up
zzCenter cursor line
ztPut cursor line at top
zbPut cursor line at bottom

3. Editing

ShortcutDescription
xDelete character
XDelete character before cursor
ddDelete current line
DDelete to end of line
dwDelete word
d$Delete to end of line
diwDelete inside word
di"Delete inside quotes
di(Delete inside parentheses
ciwChange current word
ci"Change inside quotes
ci(Change inside parentheses
ccChange current line
CChange to end of line
yyCopy/yank current line
ywCopy/yank word
y$Copy to end of line
pPaste after cursor
PPaste before cursor
uUndo
<C-r>Redo
.Repeat last change
JJoin next line
~Toggle character case
gu{motion}Convert to lowercase
gU{motion}Convert to uppercase
>>Indent line
<<Unindent line
=Auto-indent with motion
gg=GFormat indentation for whole file

4. Visual mode

ShortcutDescription
vSelect characters
VSelect entire lines
<C-v>Select rectangular block
oMove to other end of selection
yCopy selection
dDelete selection
cReplace selection
>Indent selection
<Unindent selection
=Auto-indent selection
UConvert selection to uppercase
uConvert selection to lowercase
gvReselect last selection

5. Search and replace

ShortcutDescription
/textSearch forward
?textSearch backward
nNext result
NPrevious result
*Search word under cursor forward
#Search word under cursor backward
:%s/old/new/gReplace all occurrences
:%s/old/new/gcReplace all with confirmation
:nohClear search highlight

6. Files, buffers and windows

Files

Shortcut or commandDescription
:wSave file
:waSave all files
:qQuit window
:q!Quit without saving
:wq or ZZSave and quit
:e pathOpen file
:e!Reload discarding changes

Buffers

Shortcut or commandDescription
:lsList buffers
:bnext or :bnNext buffer
:bprevious or :bpPrevious buffer
:buffer {number}Open buffer by number
:bdelete or :bdDelete current buffer
<C-^>Alternate between two buffers

Windows

Shortcut or commandDescription
:split or <C-w>sHorizontal split
:vsplit or <C-w>vVertical split
<C-w>hFocus left window
<C-w>jFocus lower window
<C-w>kFocus upper window
<C-w>lFocus right window
<C-w>wCycle windows
<C-w>qClose current window
<C-w>=Equalize window sizes
<C-w>_Maximize height
<C-w>|Maximize width
<C-w>oClose other windows

7. Marks, jumps and registers

ShortcutDescription
m{letter}Create mark
'{letter}Jump to marked line
`{letter}Jump to exact marked position
<C-o>Jump backward
<C-i>Jump forward
:jumpsShow jump list
:marksShow marks
"0pPaste last yank
"+yCopy to system clipboard
"+pPaste from system clipboard
"_dDelete without copying

8. Macros

ShortcutDescription
q{letter}Start recording macro
qStop recording
@{letter}Execute macro
@@Repeat last macro
{number}@{letter}Execute macro multiple times

9. Comments — comment.lua

The exact mapping depends on which comment plugin your comment.lua loads.

Common mappings used by Comment.nvim:

ShortcutDescription
gccToggle comment on current line
gc{motion}Toggle line comment using motion
gbcToggle block comment on current line
gb{motion}Block comment using motion
gc in Visual modeToggle selected lines
gb in Visual modeToggle selected block

Examples:

CommandDescription
gcipComment current paragraph
gc3jComment current and next 3 lines

10. Telescope — telescope.lua

Global shortcuts that open Telescope are config-dependent. Common custom mappings are:

Common mappingDescription
<leader>ffFind files
<leader>fgLive grep in project
<leader>fbFind open buffers
<leader>fhSearch help tags
<leader>frRecent files
<leader>fkSearch keymaps
<leader>fdSearch diagnostics
<leader>fsSearch document symbols

Inside Telescope:

ShortcutDescription
<C-n> or <Down>Next result
<C-p> or <Up>Previous result
<CR>Open selected result
<C-x>Open in horizontal split
<C-v>Open in vertical split
<C-t>Open in new tab
<C-u>Scroll preview up
<C-d>Scroll preview down
<Tab>Toggle selection and move next
<S-Tab>Toggle selection and move previous
<C-q>Send selected results to quickfix
<Esc> or <C-c>Close Telescope

Useful commands:

vim
:Telescope find_files
:Telescope live_grep
:Telescope buffers
:Telescope help_tags
:Telescope oldfiles
:Telescope keymaps
:Telescope diagnostics

11. Neo-tree — neo-tree.lua

The shortcut used to open Neo-tree is config-dependent. A common mapping is:

Common mappingDescription
<leader>eToggle file explorer

Useful commands:

vim
:Neotree toggle
:Neotree reveal
:Neotree focus
:Neotree filesystem
:Neotree buffers
:Neotree git_status

Inside Neo-tree:

ShortcutDescription
<CR>Open file or expand directory
SOpen in horizontal split
sOpen in vertical split
tOpen in new tab
aAdd file or directory
dDelete item
rRename item
yCopy item to clipboard
xCut item to clipboard
pPaste item
cCopy item
mMove item
qClose Neo-tree
RRefresh tree
HToggle hidden files
/Filter files
?Show Neo-tree help

12. Bufferline — bufferline.lua

Bufferline does not necessarily create global shortcuts. These are common custom mappings:

Common mappingDescription
<S-h>Previous buffer
<S-l>Next buffer
[bPrevious buffer
]bNext buffer
<leader>bdDelete current buffer
<leader>bpPin/unpin buffer

Useful commands:

vim
:BufferLineCycleNext
:BufferLineCyclePrev
:BufferLineMoveNext
:BufferLineMovePrev
:BufferLinePick
:BufferLinePickClose
:BufferLineCloseOthers
:BufferLineCloseLeft
:BufferLineCloseRight
:BufferLineTogglePin

13. LSP — lsp.lua

LSP mappings are usually defined inside your lsp.lua, often during LspAttach.

Common mappings:

Common mappingDescription
gdGo to definition
gDGo to declaration
grFind references
giGo to implementation
gtGo to type definition
KShow hover documentation
<C-k> in Insert modeShow signature help
<leader>rnRename symbol
<leader>caCode action
<leader>fFormat document
[dPrevious diagnostic
]dNext diagnostic
<leader>dShow diagnostic message
<leader>qDiagnostics quickfix list

Native LSP commands:

vim
:lua vim.lsp.buf.definition()
:lua vim.lsp.buf.references()
:lua vim.lsp.buf.rename()
:lua vim.lsp.buf.code_action()
:lua vim.diagnostic.open_float()

14. Completion — cmp.lua

Inside the completion menu, mappings are config-dependent. Common nvim-cmp mappings:

Common mappingDescription
<C-n>Select next completion item
<C-p>Select previous completion item
<C-d>Scroll documentation up
<C-f>Scroll documentation down
<C-Space>Open completion menu
<C-e>Close completion menu
<CR>Confirm selected item
<Tab>Next item or expand snippet
<S-Tab>Previous item

15. Formatting — conform.lua

Formatting shortcuts are completely config-dependent.

Common mapping:

Common mappingDescription
<leader>fFormat current file or selection

Typical Lua command:

lua
require("conform").format({ async = true, lsp_format = "fallback" })

Useful inspection:

vim
:ConformInfo

16. Git signs — gitsigns.lua

Common Gitsigns mappings:

Common mappingDescription
]cNext Git hunk
[cPrevious Git hunk
<leader>hsStage hunk
<leader>hrReset hunk
<leader>hSStage entire buffer
<leader>hRReset entire buffer
<leader>huUndo staged hunk
<leader>hpPreview hunk
<leader>hbShow blame for current line
<leader>hdDiff against index
ihSelect Git hunk in operator/visual mode

17. Autopairs — autopairs.lua

nvim-autopairs normally works automatically.

ActionDescription
Type (, [, {, ", 'Automatically insert the closing pair
<BS>Delete an empty pair
<CR>Add an indented line inside a pair, if configured

18. Treesitter — treesitter.lua

Treesitter mainly improves syntax parsing and highlighting. It may not add shortcuts unless incremental selection is configured.

Common incremental-selection mappings:

Common mappingDescription
<C-Space>Start or expand syntax selection
<BS>Shrink syntax selection

Useful commands:

vim
:Inspect
:InspectTree
:TSInstallInfo
:TSUpdate

19. Indentation — indent.lua

Indent guide plugins usually add visual guides only and may have no keyboard mappings.

Native indentation shortcuts:

ShortcutDescription
>>Indent current line
<<Unindent current line
> in Visual modeIndent selection
< in Visual modeUnindent selection
=Reindent using a motion
gg=GReindent entire file

20. UI plugins

These plugins normally do not add important editing shortcuts:

  • alpha.lua — startup dashboard / tela inicial
  • lualine.lua — status line / barra de status
  • tokyo-night.lua — color scheme / tema de cores
  • indent.lua — indentation guides / guias de indentação

Alpha dashboard shortcuts depend entirely on your alpha.lua configuration.


21. Discover your exact mappings

Run these commands inside Neovim:

vim
:map
:nmap
:imap
:vmap
:xmap
:map <leader>
:verbose nmap <leader>e
:verbose nmap gd
:Telescope keymaps

Meaning:

CommandDescription
:mapShow mappings for several modes
:nmapShow Normal-mode mappings
:imapShow Insert-mode mappings
:vmapShow Visual-mode mappings
:verbose nmap ...Show mapping and where it was defined
:Telescope keymapsSearch active mappings interactively

To inspect the leader key:

vim
:lua print(vim.g.mapleader)
:lua print(vim.g.maplocalleader)

22. Essential daily shortcuts

ShortcutDescription
iInsert text
<Esc>Normal mode
:wSave
:qQuit
uUndo
<C-r>Redo
yyCopy line
ddDelete line
pPaste
ciwReplace word
/textSearch
n / NNext/previous result
gg / GStart/end of file
<C-o> / <C-i>Back/forward jump
.Repeat last edit
gccToggle line comment
gdGo to definition
KShow documentation
]d / [dNext/previous diagnostic
<leader>ffFind files, when configured
<leader>fgSearch project text, when configured
<leader>eToggle Neo-tree, when configured

Accuracy note

Neovim's native shortcuts are stable, but plugin launch mappings such as <leader>ff, <leader>e, gd, formatting and buffer navigation are commonly customized in Lua configuration files. Always use :verbose map or :Telescope keymaps to confirm your active configuration.