Personal cheatsheet for my Neovim setup. Leader key is <Space>.

General

Keys Action
<Space>sv Source init.lua (reload config)
\ Clear search highlight
<Leader>w :w (save buffer)
<Leader>j :j (join lines, keep whitespace)
<Leader>J :j! (join lines without space)
<Leader>cp Copy current file path to clipboard
qq :q (quit window)
QQ :q! (force quit)
qo :only (close all other windows)
q / Q Disabled (no accidental macro recording)

Window Navigation & Resize

Keys Action
<S-h> Move to left window
<S-j> Move to window below
<S-k> Move to window above
<S-l> Move to right window
<C-S-Left> Shrink window width by 5
<C-S-Right> Grow window width by 5
<C-S-Up> Grow window height by 5
<S-u> Half-page up (re-mapped from <C-u>)
<S-d> Half-page down (re-mapped from <C-d>)

Visual Mode

Keys Action
> / < Indent / outdent and keep selection
<S-j> Move selection down
<S-k> Move selection up

Telescope (Fuzzy Finder)

Keys Action
<Leader>ff Find files (includes hidden)
<Leader>fg Live grep
<Leader>fb List buffers
<Leader>fl Fuzzy find in current buffer
<Leader>fh Help tags
<Leader>fv Git-tracked files
<Leader>fk List keymaps
<Leader>fp Planets (easter egg)

LSP (active when a language server attaches)

Keys Action
gd Go to definition
gD Go to declaration
gr List references
gi Go to implementation
K Hover info
<Leader>ca Code action
<Leader>rn Rename symbol
<Leader>d Show diagnostic in float
[d Previous diagnostic
]d Next diagnostic

File Explorer & Startify

Keys Action
<Leader>e Toggle NvimTree (file explorer)
<Leader>S Open Startify dashboard

Startify bookmarks:

Key File
i ~/.config/nvim/init.lua
p ~/.config/nvim/lua/plugins.lua
c ~/.config/nvim/lua/config.lua
o ~/.config/nvim/lua/options.lua
f ~/.config/fish/config.fish
g ~/.config/git/gitconfig_global
t ~/.config/tmux/tmux.conf

Search & Replace (Spectre)

Keys Action
<Leader>sr Open Spectre (project-wide search/replace)
<Leader>sw Search current word under cursor
<Leader>sp Search in current file only

Git

Keys Action
<Leader>gb Toggle git blame for current line

Peekup (Register Preview)

Keys Action
<Leader>p Paste from register, after cursor
<Leader>P Paste from register, before cursor

Copilot (Insert Mode)

Tab is not used (g.copilot_no_tab_map = true).

Keys Action
<C-J> Accept suggestion
<C-K> Cancel suggestion
<C-N> Next suggestion
<C-P> Previous suggestion

Useful Defaults Worth Remembering

  • Clipboard is unified with system (clipboard=unnamedplus) — yank/paste goes through pbpaste/pbcopy.
  • New splits open below (splitbelow) and to the right (splitright).
  • Smart case search — lowercase pattern matches case-insensitively, mixed case is sensitive.
  • Trailing whitespace is stripped automatically before leaving insert mode.
  • Yanked text briefly highlights.
  • Filetype detection: Fastfile → ruby, *.tfvars → hcl.