1 Keybinds
mitsimi edited this page 2026-07-01 22:43:51 +02:00

Keybinds

The leader key is <space>.

General

Key Mode Action
<Esc> Normal Clear search highlighting
<space>q Normal Open diagnostics in the location list
<Esc><Esc> Terminal Leave Terminal mode
<C-h> Normal Move to the window on the left
<C-j> Normal Move to the window below
<C-k> Normal Move to the window above
<C-l> Normal Move to the window on the right

Yanked text is highlighted automatically so it is easier to see what was copied.

Key Mode Action
<space>sh Normal Search help tags
<space>sk Normal Search keymaps
<space>sf Normal Find files
<space>ss Normal Pick a Telescope builtin
<space>sw Normal/Visual Search current word or selection
<space>sg Normal Live grep the project
<space>sd Normal Search diagnostics
<space>sr Normal Resume the last Telescope picker
<space>s. Normal Search recently opened files
<space>sc Normal Search commands
<space><space> Normal Search open buffers
<space>/ Normal Fuzzy search inside the current buffer
<space>s/ Normal Live grep inside open files
<space>sn Normal Search files in the Neovim config directory

Inside Telescope, use <C-/> in Insert mode or ? in Normal mode to see picker specific actions.

LSP

These mappings exist only in buffers where a language server is attached.

Key Mode Action
grn Normal Rename symbol
gra Normal/Visual Code action
grD Normal Go to declaration
grr Normal Find references
gri Normal Go to implementation
grd Normal Go to definition
gO Normal Document symbols
gW Normal Workspace symbols
grt Normal Go to type definition
<space>th Normal Toggle inlay hints, if supported

Git Hunks

These mappings come from Gitsigns and are available in Git-controlled files.

Key Mode Action
]c Normal Jump to next Git change
[c Normal Jump to previous Git change
<space>hs Normal/Visual Stage hunk
<space>hr Normal/Visual Reset hunk
<space>hS Normal Stage buffer
<space>hR Normal Reset buffer
<space>hp Normal Preview hunk
<space>hi Normal Preview hunk inline
<space>hb Normal Blame current line
<space>hd Normal Diff against index
<space>hD Normal Diff against last commit
<space>hq Normal Quickfix list for current file changes
<space>hQ Normal Quickfix list for all repo changes
<space>tb Normal Toggle current line blame
<space>tw Normal Toggle word diff
ih Operator/Visual Select hunk text object

Formatting

Key Mode Action
<space>f Normal/Visual Format the current buffer or selection

Formatting is handled by conform.nvim. This config uses LSP formatting as a fallback when no external formatter is configured.

Completion

Completion is provided by blink.cmp with the default keymap preset.

Key Mode Action
<C-y> Insert Accept selected completion
<Tab> Insert/Select Move through snippet placeholders
<S-Tab> Insert/Select Move backward through snippet placeholders
<C-Space> Insert Open completion menu or docs
<C-n> / <Down> Insert Select next item
<C-p> / <Up> Insert Select previous item
<C-e> Insert Hide completion menu
<C-k> Insert Toggle signature help

Mini.nvim

mini.ai improves text objects, and mini.surround adds surround editing.

Examples:

  • va): visually select around parentheses.
  • ci': change inside single quotes.
  • saiw): add parentheses around the inner word.
  • sd': delete surrounding single quotes.
  • sr)': replace surrounding parentheses with single quotes.

This config changes mini.ai next-object mappings to avoid conflicts with newer Neovim Treesitter mappings:

  • aa: around next text object.
  • ii: inside next text object.