Skip to main content

Keymaps

This documentation contains all keymaps configured in the Neovim setup, organized by categories.

Generic Keymaps

KeymapModeDescription
<leader>,NormalFirst buffer
<leader>.NormalLast buffer
<Tab>NormalNext buffer
<S-Tab>NormalPrevious buffer
<leader>bqNormalClose other buffers
<leader>blNormalBuffer list
<leader>bxNormalClose buffer
<leader>albNormalInsert empty line below
<leader>slNormalSelect line (no newline)
<leader>ylNormalCopy line (no newline)
<leader>aNormalSelect entire file
<leader>dNormal/VisualDelete (keep clipboard)
<leader>;NormalAdd a semicolon (;) to the end of the line
<leader>dyNormalShow diagnostics
<leader>fNormalSearch forward
<VisualIndent left (keep selection)
>VisualIndent right (keep selection)
<C-h>InsertMove cursor one character to the left in insert mode
<C-j>InsertMove cursor one character down in insert mode
<C-k>InsertMove cursor one character up in insert mode
<C-l>InsertMove cursor one character to the right in insert mode
<A-j>NormalMove line down
<A-k>NormalMove line up
<A-j>VisualMove selection down
<A-k>VisualMove selection up
<C-h>NormalGo to the left window
<C-j>NormalGo to the down window
<C-k>NormalGo to the up window
<C-l>NormalGo to the right window
<C-Up>NormalIncrease window height
<C-Down>NormalDecrease window height
<C-Left>NormalDecrease window width
<C-Right>NormalIncrease window width
<leader>wNormalSplit window
<leader>wvNormalSplit window vertically
<leader>wqNormalQuit a window
<leader>tNormalSplit terminal
<leader>tvNormalSplit terminal vertically

Plugin Keymaps

LSP

These keymaps are available in buffers with LSP enabled.

KeymapModeDescription
gdNormalGo to definition
gDNormalGo to declaration
giNormalGo to implementation
grNormalFind references
KNormalHover documentation
<leader>rnNormalRename symbol
<leader>caNormal/VisualCode actions
[dNormalPrevious diagnostic
]dNormalNext diagnostic
<leader>eNormalShow diagnostic float

Telescope

KeymapModeDescription
<leader><Space>NormalCommand palette
<leader>ffNormalFind files
<leader>fgNormalLive grep (search text in project)
<leader>fbNormalFind buffers
<leader>fhNormalHelp tags
<leader>frNormalRecent Files
<leader>fcNormalFind config files
<leader>ffhNormalFind files + hidden
<leader>ffaNormalFind all files
<leader>ldNormalLSP definitions
<leader>lDNormalLSP type definitions
<leader>liNormalLSP implementations
<leader>lrNormalLSP references
<leader>lsNormalLSP document symbols
<leader>lSNormalLSP workspace symbols

Yanky

KeymapModeDescription
<leader>hNormalYank history

Aerial

KeymapModeDescription
<leader>oNormalToggle outline

NvimTree

KeymapModeDescription
<leader>-NormalToggle explorer

Oil

KeymapModeDescription
-NormalOpen parent directory
g.NormalToggle hidden files and directories

Flash

KeymapModeDescription
zkNormal/Visual/OperatorFlash jump
ZkNormal/Visual/OperatorFlash Treesitter
rOperatorRemote flash
ROperator/VisualTreesitter search
<C-s>CommandToggle flash search

Mini Surround

KeymapModeDescription
saVisualAdd surrounding
sdVisualDelete surrounding
sfVisualFind surrounding
sFVisualFind surrounding (left)
shVisualHighlight surrounding
srVisualReplace surrounding
snVisualUpdate search range

TreeSJ

KeymapModeDescription
<leader>jNormalCombine several lines into one
<leader>sNormalSeparate into several lines
<leader>mNormalToggle between split ↔ join

Lazygit

KeymapModeDescription
<leader>ggNormalOpen panel

Diffview

KeymapModeDescription
<leader>doNormalOpen panel
<leader>dHNormalFile history (current file)
<leader>dcNormalClose panel

Gitsigns

KeymapModeDescription
<leader>gpNormalPreview hunks in popup
<leader>gsNormalStage hunk
<leader>grNormalReset hunk
<leader>gbNormalToggle current line blame
<leader>giNormalShow info about the commit
<leader>gdNormalDiff against HEAD
<leader>gnNormalToggle number highlighting for changes
<leader>glNormalToggle line highlighting for changes

Mynotes

KeymapModeDescription
<leader>\NormalShow window with my notes

Phantom

KeymapModeDescription
<leader>slsNormalShow sessions panel

Trouble

KeymapModeDescription
<leader>xxNormalToggle diagnostics
<leader>xXNormalToggle buffer diagnostics
<leader>csNormalToggle symbols
<leader>clNormalToggle LSP list
<leader>xQNormalToggle quickfix list
<leader>xLNormalToggle location list

DAP (Debug Adapter Protocol)

KeymapModeDescription
<F5>NormalContinue debugging
<F10>NormalStep over
<F11>NormalStep into
<F12>NormalStep out
<leader>dbNormalToggle breakpoint
<leader>dBNormalSet conditional breakpoint
<leader>drNormalOpen REPL
<leader>dlNormalRun last debug session

Notes

  • <leader> is configured as the space key (<Space>)
  • LSP keymaps are only available in buffers where there is an active LSP server
  • Some keymaps may require certain plugins to be loaded or configured