Skip to main content

Keymaps, search, and navigation

Discovering keymaps

This config installs which-key:

Most mappings are defined with descriptions in:

If you forget a shortcut, use which-key and leader mappings as the primary discovery mechanism.

Starter keymaps

AreaKeys
Window navigationCtrl-h/j/k/l; leader-<bar> split right; leader-- split below
Buffersleader-bb or leader-` toggles last buffer; [b / ]b move buffers
Searchleader-Space files; leader-sg live grep; leader-/ current buffer grep
Explorerleader-e Neo-tree cwd; leader-ge Neo-tree git status
Diagnostics / quickfixleader-cd, [d, ]d, leader-xq, leader-xl
Git hunks[h, ]h, leader-ghp
GitHub / Octoleader-goa, leader-goil, leader-gois, leader-gopl, leader-gops, leader-godl, leader-gonl, leader-gos

Search and navigation

Repo search is centered around fzf-lua:

High-signal mappings:

MappingScope
leader-sgLive grep in cwd
leader-seGrep changed lines from git status
leader-sEGrep changed lines from branch
leader-sfGrep changed files from git status
leader-sFGrep changed files from branch

File explorers:

  • Neo-tree: plugins/neo-tree.lua
  • Yazi: same file (mikavilpas/yazi.nvim)
  • Oil: same file (stevearc/oil.nvim)

Useful tree mappings:

  • leader-nf: find in selected directory.
  • leader-ng: grep in selected directory.
  • leader-yp: copy relative path.