Keybindings Reference
Complete reference for all keybindings in this Neovim configuration.
Leader Key
| Key |
Function |
<Space> |
Leader key |
\ |
Local leader |
Navigation
Window Navigation
| Key |
Action |
Mode |
<C-h> |
Move to left window |
Normal |
<C-j> |
Move to lower window |
Normal |
<C-k> |
Move to upper window |
Normal |
<C-l> |
Move to right window |
Normal |
Buffer Navigation
| Key |
Action |
Mode |
<S-h> |
Previous buffer |
Normal |
<S-l> |
Next buffer |
Normal |
<leader>bd |
Delete buffer |
Normal |
<leader>ba |
Delete all buffers except current |
Normal |
Harpoon (Quick Files)
| Key |
Action |
Mode |
<leader>a |
Add file to harpoon |
Normal |
<C-e> |
Toggle harpoon menu |
Normal |
<C-1> - <C-4> |
Navigate to file 1-4 |
Normal |
Jumps
| Key |
Action |
Mode |
<C-d> |
Scroll down (centered) |
Normal |
<C-u> |
Scroll up (centered) |
Normal |
n |
Next search result (centered) |
Normal |
N |
Previous search result (centered) |
Normal |
[d |
Previous diagnostic |
Normal |
]d |
Next diagnostic |
Normal |
[c |
Previous git change |
Normal |
]c |
Next git change |
Normal |
Search (Telescope)
| Key |
Action |
Mode |
<leader>sf |
Search files |
Normal |
<leader>sg |
Search by grep |
Normal |
<leader>sw |
Search current word |
Normal |
<leader>sh |
Search help tags |
Normal |
<leader>sk |
Search keymaps |
Normal |
<leader>sd |
Search diagnostics |
Normal |
<leader>sr |
Resume last search |
Normal |
<leader>ss |
Search Telescope builtins |
Normal |
<leader>sn |
Search Neovim config files |
Normal |
<leader><space> |
Search buffers |
Normal |
<leader>/ |
Fuzzy search in buffer |
Normal |
<leader>? |
Search recent files |
Normal |
<leader>gf |
Search git files |
Normal |
LSP
Navigation
| Key |
Action |
Mode |
gd |
Go to definition |
Normal |
gr |
Go to references |
Normal |
gI |
Go to implementation |
Normal |
gD |
Go to declaration |
Normal |
<leader>D |
Type definition |
Normal |
<leader>ds |
Document symbols |
Normal |
<leader>ws |
Workspace symbols |
Normal |
Actions
| Key |
Action |
Mode |
K |
Hover documentation |
Normal |
<C-k> |
Signature help |
Insert |
<leader>rn |
Rename symbol |
Normal |
<leader>ca |
Code action |
Normal, Visual |
<leader>cf |
Format buffer |
Normal |
Git
Gitsigns
| Key |
Action |
Mode |
<leader>hs |
Stage hunk |
Normal |
<leader>hr |
Reset hunk |
Normal |
<leader>hS |
Stage buffer |
Normal |
<leader>hR |
Reset buffer |
Normal |
<leader>hu |
Undo stage hunk |
Normal |
<leader>hp |
Preview hunk |
Normal |
<leader>hb |
Blame line |
Normal |
<leader>hd |
Diff against index |
Normal |
<leader>hD |
Diff against last commit |
Normal |
<leader>tb |
Toggle line blame |
Normal |
<leader>td |
Toggle deleted |
Normal |
Text Objects (Git)
| Key |
Action |
Mode |
ih |
Inner hunk |
Operator-pending, Visual |
ah |
Around hunk |
Operator-pending, Visual |
Fugitive
| Key |
Action |
Mode |
:Git |
Git status |
Command |
:Gdiffsplit |
Diff current file |
Command |
:Gread |
Checkout file |
Command |
:Gwrite |
Stage file |
Command |
Editing
Basic
| Key |
Action |
Mode |
<Esc> |
Clear search highlights |
Normal |
jk |
Exit insert mode |
Insert |
<C-s> |
Save file |
Normal, Insert |
<leader>q |
Quit |
Normal |
<leader>Q |
Force quit |
Normal |
<leader>wa |
Save all |
Normal |
Text Manipulation
| Key |
Action |
Mode |
J |
Move selection down |
Visual |
K |
Move selection up |
Visual |
< |
Indent left (keep selection) |
Visual |
> |
Indent right (keep selection) |
Visual |
Clipboard
| Key |
Action |
Mode |
<leader>y |
Yank to system clipboard |
Normal, Visual |
<leader>Y |
Yank line to clipboard |
Normal |
<leader>d |
Delete to void register |
Normal, Visual |
<leader>p |
Paste without yanking |
Visual |
<C-c> |
Copy to clipboard |
Visual |
<C-v> |
Paste from clipboard |
Normal, Insert |
Commenting
| Key |
Action |
Mode |
gcc |
Toggle line comment |
Normal |
gbc |
Toggle block comment |
Normal |
gc |
Comment motion |
Normal, Visual |
gb |
Block comment motion |
Normal, Visual |
gco |
Add comment below |
Normal |
gcO |
Add comment above |
Normal |
gcA |
Add comment at end of line |
Normal |
Surround (mini.surround)
| Key |
Action |
Mode |
sa |
Add surrounding |
Normal, Visual |
sd |
Delete surrounding |
Normal |
sr |
Replace surrounding |
Normal |
File Explorer (Neo-tree)
| Key |
Action |
Mode |
\ or \\ |
Toggle Neo-tree |
Normal |
<leader>e |
Focus Neo-tree |
Normal |
Inside Neo-tree
| Key |
Action |
? |
Show help |
<CR> |
Open file/folder |
s |
Open in horizontal split |
v |
Open in vertical split |
t |
Open in new tab |
a |
Add file/folder |
d |
Delete |
r |
Rename |
y |
Copy path |
x |
Cut |
p |
Paste |
c |
Copy |
R |
Refresh |
H |
Toggle hidden files |
Completion (blink.cmp with super-tab preset)
Using super-tab preset - Tab/S-Tab for menu navigation and snippet jumping.
| Key |
Action |
Mode |
<Tab> |
Next item / Jump to next snippet placeholder |
Insert, Select |
<S-Tab> |
Previous item / Jump to previous snippet placeholder |
Insert, Select |
<CR> |
Confirm selection |
Insert |
<C-Space> |
Show/toggle completion menu |
Insert |
<C-e> |
Close completion |
Insert |
<C-b> |
Scroll docs up |
Insert |
<C-f> |
Scroll docs down |
Insert |
Note: When no completion menu is visible, Tab inserts a normal tab character.
Debugging (DAP)
| Key |
Action |
Mode |
<F5> |
Continue/Start |
Normal |
<F10> |
Step over |
Normal |
<F11> |
Step into |
Normal |
<F12> |
Step out |
Normal |
<leader>b |
Toggle breakpoint |
Normal |
<leader>B |
Conditional breakpoint |
Normal |
<leader>lp |
Log point |
Normal |
<leader>dr |
Open REPL |
Normal |
<leader>dl |
Run last |
Normal |
<leader>dh |
Hover variables |
Normal |
Terminal
| Key |
Action |
Mode |
<C-\> |
Toggle terminal |
Normal |
<Esc><Esc> |
Exit terminal mode |
Terminal |
<C-h/j/k/l> |
Navigate from terminal |
Terminal |
Testing (Neotest)
| Key |
Action |
Mode |
<leader>tt |
Run nearest test |
Normal |
<leader>tT |
Run all tests in file |
Normal |
<leader>tr |
Run test suite |
Normal |
<leader>tl |
Run last test |
Normal |
<leader>ts |
Toggle test summary |
Normal |
<leader>to |
Show test output |
Normal |
Flash (Motion)
| Key |
Action |
Mode |
s |
Flash jump |
Normal |
S |
Flash treesitter |
Normal |
r |
Remote flash |
Operator-pending |
Treesitter
| Key |
Action |
Mode |
<C-space> |
Increment selection |
Normal |
<BS> |
Decrement selection |
Visual |
Text Objects
| Key |
Action |
Mode |
af |
Around function |
Operator-pending, Visual |
if |
Inner function |
Operator-pending, Visual |
ac |
Around class |
Operator-pending, Visual |
ic |
Inner class |
Operator-pending, Visual |
]f |
Next function start |
Normal |
[f |
Previous function start |
Normal |
]c |
Next class start |
Normal |
[c |
Previous class start |
Normal |
Adding Custom Keybindings
In config/keymaps.lua
-- Inside M.setup()
vim.keymap.set('n', '<leader>xx', function()
-- Your action here
end, { desc = 'Description for which-key' })
In Plugin Spec
{
"plugin/name",
keys = {
{ "<leader>xx", "<cmd>Command<CR>", desc = "Description" },
{ "<leader>xy", function() ... end, desc = "Lua function" },
},
}
Buffer-Local Keybindings
vim.api.nvim_create_autocmd("FileType", {
pattern = "markdown",
callback = function()
vim.keymap.set('n', '<leader>mp', '<cmd>MarkdownPreview<CR>', {
buffer = true,
desc = "Markdown Preview",
})
end,
})
Discovering Keybindings
| Command |
Description |
<leader>sk |
Search keymaps with Telescope |
:map |
List all mappings |
:nmap <leader> |
List leader mappings |
:verbose map <key> |
Show where mapping is defined |
Press <leader> and wait |
Which-key popup |
1---2name: keybindings-reference3description: Complete reference for all keybindings in this Neovim configuration.4---5# Keybindings Reference67Complete reference for all keybindings in this Neovim configuration.89## Leader Key1011| Key | Function |12|-----|----------|13| `<Space>` | Leader key |14| `\` | Local leader |1516## Navigation1718### Window Navigation1920| Key | Action | Mode |21|-----|--------|------|22| `<C-h>` | Move to left window | Normal |23| `<C-j>` | Move to lower window | Normal |24| `<C-k>` | Move to upper window | Normal |25| `<C-l>` | Move to right window | Normal |2627### Buffer Navigation2829| Key | Action | Mode |30|-----|--------|------|31| `<S-h>` | Previous buffer | Normal |32| `<S-l>` | Next buffer | Normal |33| `<leader>bd` | Delete buffer | Normal |34| `<leader>ba` | Delete all buffers except current | Normal |3536### Harpoon (Quick Files)3738| Key | Action | Mode |39|-----|--------|------|40| `<leader>a` | Add file to harpoon | Normal |41| `<C-e>` | Toggle harpoon menu | Normal |42| `<C-1>` - `<C-4>` | Navigate to file 1-4 | Normal |4344### Jumps4546| Key | Action | Mode |47|-----|--------|------|48| `<C-d>` | Scroll down (centered) | Normal |49| `<C-u>` | Scroll up (centered) | Normal |50| `n` | Next search result (centered) | Normal |51| `N` | Previous search result (centered) | Normal |52| `[d` | Previous diagnostic | Normal |53| `]d` | Next diagnostic | Normal |54| `[c` | Previous git change | Normal |55| `]c` | Next git change | Normal |5657## Search (Telescope)5859| Key | Action | Mode |60|-----|--------|------|61| `<leader>sf` | Search files | Normal |62| `<leader>sg` | Search by grep | Normal |63| `<leader>sw` | Search current word | Normal |64| `<leader>sh` | Search help tags | Normal |65| `<leader>sk` | Search keymaps | Normal |66| `<leader>sd` | Search diagnostics | Normal |67| `<leader>sr` | Resume last search | Normal |68| `<leader>ss` | Search Telescope builtins | Normal |69| `<leader>sn` | Search Neovim config files | Normal |70| `<leader><space>` | Search buffers | Normal |71| `<leader>/` | Fuzzy search in buffer | Normal |72| `<leader>?` | Search recent files | Normal |73| `<leader>gf` | Search git files | Normal |7475## LSP7677### Navigation7879| Key | Action | Mode |80|-----|--------|------|81| `gd` | Go to definition | Normal |82| `gr` | Go to references | Normal |83| `gI` | Go to implementation | Normal |84| `gD` | Go to declaration | Normal |85| `<leader>D` | Type definition | Normal |86| `<leader>ds` | Document symbols | Normal |87| `<leader>ws` | Workspace symbols | Normal |8889### Actions9091| Key | Action | Mode |92|-----|--------|------|93| `K` | Hover documentation | Normal |94| `<C-k>` | Signature help | Insert |95| `<leader>rn` | Rename symbol | Normal |96| `<leader>ca` | Code action | Normal, Visual |97| `<leader>cf` | Format buffer | Normal |9899## Git100101### Gitsigns102103| Key | Action | Mode |104|-----|--------|------|105| `<leader>hs` | Stage hunk | Normal |106| `<leader>hr` | Reset hunk | Normal |107| `<leader>hS` | Stage buffer | Normal |108| `<leader>hR` | Reset buffer | Normal |109| `<leader>hu` | Undo stage hunk | Normal |110| `<leader>hp` | Preview hunk | Normal |111| `<leader>hb` | Blame line | Normal |112| `<leader>hd` | Diff against index | Normal |113| `<leader>hD` | Diff against last commit | Normal |114| `<leader>tb` | Toggle line blame | Normal |115| `<leader>td` | Toggle deleted | Normal |116117### Text Objects (Git)118119| Key | Action | Mode |120|-----|--------|------|121| `ih` | Inner hunk | Operator-pending, Visual |122| `ah` | Around hunk | Operator-pending, Visual |123124### Fugitive125126| Key | Action | Mode |127|-----|--------|------|128| `:Git` | Git status | Command |129| `:Gdiffsplit` | Diff current file | Command |130| `:Gread` | Checkout file | Command |131| `:Gwrite` | Stage file | Command |132133## Editing134135### Basic136137| Key | Action | Mode |138|-----|--------|------|139| `<Esc>` | Clear search highlights | Normal |140| `jk` | Exit insert mode | Insert |141| `<C-s>` | Save file | Normal, Insert |142| `<leader>q` | Quit | Normal |143| `<leader>Q` | Force quit | Normal |144| `<leader>wa` | Save all | Normal |145146### Text Manipulation147148| Key | Action | Mode |149|-----|--------|------|150| `J` | Move selection down | Visual |151| `K` | Move selection up | Visual |152| `<` | Indent left (keep selection) | Visual |153| `>` | Indent right (keep selection) | Visual |154155### Clipboard156157| Key | Action | Mode |158|-----|--------|------|159| `<leader>y` | Yank to system clipboard | Normal, Visual |160| `<leader>Y` | Yank line to clipboard | Normal |161| `<leader>d` | Delete to void register | Normal, Visual |162| `<leader>p` | Paste without yanking | Visual |163| `<C-c>` | Copy to clipboard | Visual |164| `<C-v>` | Paste from clipboard | Normal, Insert |165166### Commenting167168| Key | Action | Mode |169|-----|--------|------|170| `gcc` | Toggle line comment | Normal |171| `gbc` | Toggle block comment | Normal |172| `gc` | Comment motion | Normal, Visual |173| `gb` | Block comment motion | Normal, Visual |174| `gco` | Add comment below | Normal |175| `gcO` | Add comment above | Normal |176| `gcA` | Add comment at end of line | Normal |177178### Surround (mini.surround)179180| Key | Action | Mode |181|-----|--------|------|182| `sa` | Add surrounding | Normal, Visual |183| `sd` | Delete surrounding | Normal |184| `sr` | Replace surrounding | Normal |185186## File Explorer (Neo-tree)187188| Key | Action | Mode |189|-----|--------|------|190| `\` or `\\` | Toggle Neo-tree | Normal |191| `<leader>e` | Focus Neo-tree | Normal |192193### Inside Neo-tree194195| Key | Action |196|-----|--------|197| `?` | Show help |198| `<CR>` | Open file/folder |199| `s` | Open in horizontal split |200| `v` | Open in vertical split |201| `t` | Open in new tab |202| `a` | Add file/folder |203| `d` | Delete |204| `r` | Rename |205| `y` | Copy path |206| `x` | Cut |207| `p` | Paste |208| `c` | Copy |209| `R` | Refresh |210| `H` | Toggle hidden files |211212## Completion (blink.cmp with super-tab preset)213214Using `super-tab` preset - Tab/S-Tab for menu navigation and snippet jumping.215216| Key | Action | Mode |217|-----|--------|------|218| `<Tab>` | Next item / Jump to next snippet placeholder | Insert, Select |219| `<S-Tab>` | Previous item / Jump to previous snippet placeholder | Insert, Select |220| `<CR>` | Confirm selection | Insert |221| `<C-Space>` | Show/toggle completion menu | Insert |222| `<C-e>` | Close completion | Insert |223| `<C-b>` | Scroll docs up | Insert |224| `<C-f>` | Scroll docs down | Insert |225226**Note:** When no completion menu is visible, Tab inserts a normal tab character.227228## Debugging (DAP)229230| Key | Action | Mode |231|-----|--------|------|232| `<F5>` | Continue/Start | Normal |233| `<F10>` | Step over | Normal |234| `<F11>` | Step into | Normal |235| `<F12>` | Step out | Normal |236| `<leader>b` | Toggle breakpoint | Normal |237| `<leader>B` | Conditional breakpoint | Normal |238| `<leader>lp` | Log point | Normal |239| `<leader>dr` | Open REPL | Normal |240| `<leader>dl` | Run last | Normal |241| `<leader>dh` | Hover variables | Normal |242243## Terminal244245| Key | Action | Mode |246|-----|--------|------|247| `<C-\>` | Toggle terminal | Normal |248| `<Esc><Esc>` | Exit terminal mode | Terminal |249| `<C-h/j/k/l>` | Navigate from terminal | Terminal |250251## Testing (Neotest)252253| Key | Action | Mode |254|-----|--------|------|255| `<leader>tt` | Run nearest test | Normal |256| `<leader>tT` | Run all tests in file | Normal |257| `<leader>tr` | Run test suite | Normal |258| `<leader>tl` | Run last test | Normal |259| `<leader>ts` | Toggle test summary | Normal |260| `<leader>to` | Show test output | Normal |261262## Flash (Motion)263264| Key | Action | Mode |265|-----|--------|------|266| `s` | Flash jump | Normal |267| `S` | Flash treesitter | Normal |268| `r` | Remote flash | Operator-pending |269270## Treesitter271272| Key | Action | Mode |273|-----|--------|------|274| `<C-space>` | Increment selection | Normal |275| `<BS>` | Decrement selection | Visual |276277### Text Objects278279| Key | Action | Mode |280|-----|--------|------|281| `af` | Around function | Operator-pending, Visual |282| `if` | Inner function | Operator-pending, Visual |283| `ac` | Around class | Operator-pending, Visual |284| `ic` | Inner class | Operator-pending, Visual |285| `]f` | Next function start | Normal |286| `[f` | Previous function start | Normal |287| `]c` | Next class start | Normal |288| `[c` | Previous class start | Normal |289290## Adding Custom Keybindings291292### In config/keymaps.lua293294```lua295-- Inside M.setup()296vim.keymap.set('n', '<leader>xx', function()297 -- Your action here298end, { desc = 'Description for which-key' })299```300301### In Plugin Spec302303```lua304{305 "plugin/name",306 keys = {307 { "<leader>xx", "<cmd>Command<CR>", desc = "Description" },308 { "<leader>xy", function() ... end, desc = "Lua function" },309 },310}311```312313### Buffer-Local Keybindings314315```lua316vim.api.nvim_create_autocmd("FileType", {317 pattern = "markdown",318 callback = function()319 vim.keymap.set('n', '<leader>mp', '<cmd>MarkdownPreview<CR>', {320 buffer = true,321 desc = "Markdown Preview",322 })323 end,324})325```326327## Discovering Keybindings328329| Command | Description |330|---------|-------------|331| `<leader>sk` | Search keymaps with Telescope |332| `:map` | List all mappings |333| `:nmap <leader>` | List leader mappings |334| `:verbose map <key>` | Show where mapping is defined |335| Press `<leader>` and wait | Which-key popup |