Skip to content

Latest commit

 

History

History
238 lines (187 loc) · 9.3 KB

SHORTCUTS.md

File metadata and controls

238 lines (187 loc) · 9.3 KB

Neovim Shortcuts

Reference for every keyboard shortcut available in this repo's Neovim setup (nvim/). Classic Vim is out of scope here — see vim/vimrc / vim/plugins.vim directly if you need those.

  • Leader key: <Space> (nvim/lua/user/options.lua)
  • Shortcuts are grouped by Custom (hand-written in this repo, in vim/vimrc or nvim/lua/user/keymaps.lua), Plugin (comes from a plugin, either configured here or the plugin's own built-in default), or Neovim Built-in (vanilla Neovim defaults — not written anywhere in this repo's config and not from a plugin).
  • Entries with no trailing note are configured explicitly in this repo. Entries marked (plugin default) are not written anywhere in this repo's config — they're the plugin's own built-in binding, listed here for completeness. Since they're not pinned by this repo, they can drift if the plugin changes its defaults upstream.

Custom

Navigation

Key Mode Action
H n Previous tab
L n Next tab
J n, v Jump 10 lines down
K n, v Jump 10 lines up
[d n Previous diagnostic
]d n Next diagnostic
[j n Jump back in jump history (built-in <C-o>, which is remapped)
]j n Jump forward in jump history (built-in <C-i>)

Editing

Key Mode Action
<C-o> n Open a new line below, stay in normal mode
X n Format entire file (gqG), restoring cursor position
lenght, widht, heigth insert Auto-corrected to length, width, height

Search / Find

Key Mode Action
<C-n> n Clear last search highlight/pattern
* v Search forward for the visually selected text
# v Search backward for the visually selected text

Diagnostics

Key Mode Action
<leader>e n Show diagnostic float under cursor
[d n Jump to previous diagnostic
]d n Jump to next diagnostic

File Explorer

Key Mode Action
<leader>tt n Toggle NvimTree
<leader>tf n Find current file in NvimTree

Neovim Built-in

Key Mode Action
<C-d> / <C-u> n Half-page down / up
<C-w> s / <C-w> v n Split window horizontally / vertically
<C-w> h/j/k/l n Move to window left/down/up/right
gp / gP n Paste after/before, leave cursor after pasted text

On Linux (incl. WSL), <C-w> h/j/k/l is overridden by vim-tmux-navigator (see "Window / Pane" under Plugin below) to also cross into tmux panes; elsewhere it's this vanilla built-in.


Plugin

Telescope

Launch keys (configured in nvim/lua/user/plugins/telescope.lua):

Key Mode Action
<C-p> n Find files (code/text only; includes dotfiles; excludes .meta, .csproj, .sln, .yaml, .json, .jsonl, .targets, Unity assets (.prefab, .anim, .controller, .shadergraph, .vfx, .texture2D), .gitignore, .gitattributes, .gitkeep, .editorconfig, binaries, media, documentation (.md, .mdc, .txt, .rst, .csv, .doc, .docx, README, CHANGELOG), hidden folders (.git/, .vscode/, .claude/, .ai/, ...), etc.)
<leader>ff n Find files (all files, incl. dotfiles; still excludes .git/)
<leader>fd n Find documentation files only (.md, .mdc, .txt, .rst, .adoc, .asciidoc, .org, README, CHANGELOG, LICENSE, CONTRIBUTING, AUTHORS, CONTRIBUTORS, MAINTAINERS, CODE_OF_CONDUCT, NOTICE, HISTORY, NEWS, TODO, .cursorrules, .clinerules, .windsurfrules)
<leader>fc n Find configuration files only (.cfg, .yml, .yaml, .json, .jsonl, .targets, .config, .toml, .conf, .properties, .ini, .editorconfig, .gitconfig, .gitignore, .gitattributes, .gitmodules, .clang-format, .clang-tidy, .npmrc, .nvmrc, .yarnrc, .eslintrc, .prettierrc, .babelrc, .dockerignore, Dockerfile, Procfile, Vagrantfile; basenames also match with a suffix, e.g. Dockerfile.dev, .eslintrc.js)
<leader>fg n Live grep
<leader>fb n List open buffers
<leader>fh n Search help tags

Inside an open Telescope picker (plugin default unless noted):

Key Mode Action
<C-n> / <Down> insert Next result
<C-p> / <Up> insert Previous result
<CR> insert Confirm selection
<C-x> / <C-s> insert Open in horizontal split (<C-s> customized)
<C-v> insert Open in vertical split
<Tab> / <S-Tab> insert Toggle multi-select on current entry and move to next/previous
<C-z> insert Toggle multi-select on current entry, cursor stays put (customized)
<C-t> insert Open in new tab; if multiple entries are multi-selected, opens each in its own new tab (customized)
<Esc> insert Close picker

LSP

Buffer-local, set on attach (nvim/lua/user/plugins/lsp.lua), applies to any attached server (lua_ls, gopls, csharp_ls/roslyn, etc.):

Key Mode Action
gd n Go to definition
gr n List references
gs n Show hover docs (C#: preceded by the full declaration header)
<leader>rn n Rename symbol
<leader>ca n Code action

Note: hover used to be on plain K, which collided with the global "jump 10 lines up" map (vim/vimrc). Moved to gs to resolve that — K now always jumps up, even in LSP-attached buffers.

Completion (blink.cmp)

Based on the built-in "default" preset, with <C-n>/<C-p>/<C-y> disabled, <C-j>/<C-k>/<C-h> added in their place, and show_signature moved off <C-k> onto <C-\> (nvim/lua/user/plugins/completion.lua):

Key Mode Action
<C-space> insert Open/trigger completion menu
<C-j> insert Next completion item
<C-k> insert Previous completion item
<C-h> insert Accept selected item
<C-\> insert Toggle signature help
<C-e> insert Cancel/hide menu
<Tab> insert Snippet forward (plugin default) — not "next item" despite this doc previously saying so
<S-Tab> insert Snippet backward (plugin default)
<C-b> / <C-f> insert Scroll signature/doc popup up/down (plugin default)

AI Suggestions (Supermaven)

Configured explicitly (nvim/lua/user/plugins/supermaven.lua) — its own Tab/Enter defaults are disabled to avoid clashing with blink.cmp:

Key Mode Action
<C-y> / <C-S-l> insert Accept suggestion
<C-l> insert Accept one word of suggestion
<C-]> insert Clear suggestion

File Explorer (nvim-tree)

Not customized in this repo (opts = {}) — built-in defaults (plugin default):

Key Mode Action
<CR> / o n Open file/directory
a n Create file/directory
d n Delete
r n Rename
x n Cut
c n Copy
p n Paste
H n Toggle hidden files
R n Refresh tree
? n Show help/all keymaps

Git (gitsigns)

Not customized in this repo (opts = {}) — built-in defaults (plugin default):

Key Mode Action
]c n Next hunk
[c n Previous hunk
<leader>hs n, v Stage hunk
<leader>hr n, v Reset hunk
<leader>hp n Preview hunk
<leader>hb n Blame line

Multi-cursor (vim-visual-multi)

Find Under / Find Subword Under remapped from the plugin default (<C-n>) to <C-g> via g:VM_maps in nvim/lua/user/plugins/misc.lua, to resolve a collision with the global "clear search" map in vim/vimrc. Everything else is a built-in default (plugin default):

Key Mode Action
<C-g> n Select word under cursor / add next match
<C-Down> / <C-Up> n Add cursor below/above
Tab multi-cursor mode Switch between cursor and extend mode
q multi-cursor mode Remove current cursor
<Esc> multi-cursor mode Exit multi-cursor mode

Window / Pane (vim-tmux-navigator, Linux only)

Only loaded on Linux, incl. WSL (nvim/lua/user/plugins/misc.lua) — a no-op without tmux, and this repo is otherwise Windows-first. Its own <C-h/j/k/l> defaults are disabled (g:tmux_navigator_no_mappings = 1) and remapped onto <C-w> h/j/k/l to match the vanilla Neovim window-navigation keys above, so the same keys cross from a Neovim split into a tmux pane once they hit a window boundary. Also mapped in terminal-mode (:terminal buffers), where <C-w> isn't a window-command prefix by default:

Key Mode Action
<C-w> h n, t Navigate to window/pane left
<C-w> j n, t Navigate to window/pane down
<C-w> k n, t Navigate to window/pane up
<C-w> l n, t Navigate to window/pane right

Debugging (nvim-dap)

Configured explicitly (nvim/lua/user/plugins/dap.lua) — each action is bound to both an Alt-key and an F-key form:

Key Mode Action
<A-b> / <F9> n Toggle breakpoint
<A-c> / <F5> n Continue / start
<A-s> / <F10> n Step over
<A-j> / <F11> n Step into
<A-k> / <S-F11> n Step out

The Unity attach configuration itself still lives in nvim/lua/user/unity_dap.lua.