Skip to main content
Navigation keymaps for finding files, switching buffers, and browsing the filesystem using Snacks pickers and file explorers.
Most navigation keymaps use Snacks pickers with fuzzy finding, live preview, and frecency-based sorting for faster access to frequently used files.

File pickers

Find and open files quickly with fuzzy matching.
KeyModeDescription
<leader><leader>normalSmart find files (ivy layout)
<leader>ffnormalFind files (ivy_taller layout)
<leader>frnormalRecent files
<leader>fpnormalProjects
<leader>ncnormalNvim config files
<leader><leader> uses smart detection to choose the best finder based on context. It’s the fastest way to open files in most situations.

Buffer navigation

Switch between open buffers efficiently.
KeyModeDescription
<leader>jknormalBuffers (picker with delete support)
<Left>normalPrevious buffer (cycle)
<Right>normalNext buffer (cycle)
<leader>bdnormalDelete buffer (Snacks)
The buffers picker (<leader>jk) opens in normal mode (not insert) and supports deleting buffers with d. See lua/plugins/snacks.lua:38.
Search file contents across the project.
KeyModeDescription
<leader>fanormalFind all (live grep)
<leader>fvnormal, visualGrep word under cursor or selection
<leader>fa uses the ivy_split layout, or dashboard_ivy_split when opened from the dashboard. See lua/plugins/snacks.lua:64.

File explorer

Browse the filesystem with tree-based navigation.
KeyModeDescription
<M-e>normalToggle Snacks file explorer
The Snacks explorer shows hidden files by default, includes diagnostic indicators, and auto-opens folders with diagnostics. See lua/plugins/snacks.lua:489.

Explorer features

  • Auto-close when opening files
  • Diagnostic integration
  • Line numbers in file list
  • Replaces netrw by default
explorer = {
  replace_netrw = true,
  diagnostics = true,
  auto_close = true,
  diagnostics_open = true,
}
See lua/plugins/snacks.lua:517.

Picker layouts

Snacks pickers support multiple layouts with different visual styles.
LayoutDescriptionUsed by
ivy_tallerBottom panel with preview<leader>ff, <leader>jk
ivy_splitSplit view with preview<leader>fa, grp
selectCompact selection list<leader>:
defaultFull-screen with preview<M-S-k>
Press <M-p> inside any picker to cycle through available layouts. See lua/plugins/snacks.lua:572.

Picker navigation

Common keymaps available inside all pickers.
KeyModeDescription
<Esc>normal, insertClose picker
<M-p>normal, insertCycle layouts
JnormalPreview scroll down
KnormalPreview scroll up
HnormalPreview scroll left
LnormalPreview scroll right
<Tab>normal, insertFocus preview window
When focused on the preview window, press <Esc> to return focus to the input field. See lua/plugins/snacks.lua:580.

Search and history

Browse command and search history.
KeyModeDescription
<leader>:normalCommand history
<leader>s/normalSearch history
<leader>srnormalResume last picker

Reference navigation

Jump to word references across files.
KeyModeDescription
<leader>fnnormalNext reference
<leader>fNnormalPrevious reference
Reference navigation uses the Snacks words feature to highlight and jump between occurrences of the word under the cursor.

Specialized pickers

Additional pickers for specific use cases.
KeyModeDescription
<M-S-k>normalKeymaps picker
<leader>sjnormalJumps
<leader>smnormalMarks
<leader>s"normalRegisters
<leader>sunormalUndo history
<leader>iinormalIcons

Picker configuration

Pickers use frecency-based sorting to prioritize frequently and recently used files:
matcher = {
  frecency = true,
}
See lua/plugins/snacks.lua:555.

Buffer deletion in picker

The buffers picker supports in-picker deletion:
win = {
  input = {
    keys = {
      ["d"] = "bufdelete",
    },
  },
  list = { 
    keys = { 
      ["d"] = "bufdelete" 
    } 
  },
}
Press d on any buffer in the list to delete it without leaving the picker. See lua/plugins/snacks.lua:52.

Explorer keymaps

Inside the Snacks explorer, additional keymaps are available:
KeyModeDescription
<a-a>normal, insertSend to Sidekick
Explorer keymaps can be customized in the win.input.keys configuration at lua/plugins/snacks.lua:531.

Workflow tips

For best results, use <leader><leader> for quick file access, <leader>fa for content search, and <leader>jk for buffer switching.

Efficient navigation patterns

  1. Find file by name: <leader>ff → type partial name → <CR>
  2. Search code: <leader>fa → type pattern → browse results
  3. Recent files: <leader>fr → select from MRU list
  4. Switch buffers: <leader>jk → type buffer name or use arrows
  5. Explore filesystem: <M-e> → navigate tree structure
All pickers support fuzzy matching, so you don’t need to type exact names. For example, typing usrmod will match user_model.ts.

Hidden files

Both the file picker and explorer show hidden files by default:
sources = {
  files = {
    hidden = true,
  },
}
explorer = {
  show_hidden = true,
}
See lua/plugins/snacks.lua:514 and lua/plugins/snacks.lua:491.

Build docs developers (and LLMs) love