Skip to content

Instantly share code, notes, and snippets.

@sefatanam
Last active March 26, 2026 20:50
Show Gist options
  • Select an option

  • Save sefatanam/e528b45bda9b4df0a417c3c852491b9b to your computer and use it in GitHub Desktop.

Select an option

Save sefatanam/e528b45bda9b4df0a417c3c852491b9b to your computer and use it in GitHub Desktop.
Here's personalized cheatsheet based on my neovim config

Neovim Blazing Fast Cheatsheet

1. Jump Anywhere Instantly

Flash.nvim (most powerful — learn this first)

Key Action
s{char}{char} Jump to any 2-char combo on screen
S Treesitter-aware jump (select nodes)
r (in operator) Remote flash — yank/delete from a distance
f{char} / F{char} Jump to char forward/backward (enhanced)
t{char} / T{char} Jump before/after char
; / , Repeat last f/t motion

File Navigation

Key Action
<leader><space> Find files (fzf)
<leader>ff Find files
<leader>fg Live grep (search all files)
<leader>fb Switch buffers
<leader>fr Recent files
<C-n> Toggle file explorer
<leader>e Focus / close explorer
<Tab> Next buffer
<S-Tab> Previous buffer
te New tab

LSP Jumping

Key Action
gd Go to definition
gD Go to declaration
gr Go to references
gi Go to implementation
gy Go to type definition
K Hover docs
gK Signature help
[d / ]d Prev/next diagnostic
[e / ]e Prev/next error

Angular-specific Jumps (your custom)

Key Action
<leader>jt Jump to template
<leader>js Jump to styles
<leader>jc Jump to component

2. Search & Replace

In-buffer

Key Action
<leader>/ Fuzzy search current buffer
/pattern Search (use n/N to cycle)
* / # Search word under cursor fwd/bwd
:%s/old/new/gc Replace with confirm
cgn Change next match (repeat with .)

Project-wide (grug-far)

Key Action
<leader>sr Search & replace (grug-far UI)
<leader>sR Search & replace (word under cursor)

FZF Grep

Key Action
<leader>sg Grep string
<leader>sw Grep word under cursor
<leader>sG Grep from root dir

3. Editing at Speed

Core

Key Action
D Delete to end of line (void register)
<leader>p Paste without replacing your register
gcc Toggle comment line
gc + motion Toggle comment block
<leader>cf Format file
<leader>fs Format selection
. Repeat last change

Text Objects (mini.ai — enhanced)

Key Action
vif Select inside function
vaf Select around function
vic Select inside class
via Select around argument
vi" / va" Inside/around quotes
vi{ / va{ Inside/around braces

LSP Code Actions

Key Action
<leader>ca Code action
<leader>cr Rename symbol
<leader>cR Rename file
<leader>cd Line diagnostics
<leader>ss Document symbols
<leader>sS Workspace symbols

Yanky (yank history)

Key Action
p Paste (cycle through history with <C-n>/<C-p> after)
<leader>sy Open yank history picker

4. Mise

Folds (nvim-ufo)

Key Action
zR Open ALL folds
zM Close ALL folds
zo / zc Open/close fold under cursor
zp Peek fold content without opening
za Toggle fold

Windows & Splits

Key Action
hs Horizontal split
vs Vertical split
<C-h/j/k/l> Move between splits (tmux-aware)
<leader>wd Delete window
<leader>wm Maximize window

Git

Key Action
<leader>gg Open lazygit
<leader>gb Git blame line
<leader>gB Git browse (open in GitHub)
<leader>ggd VGit project diff
]h / [h Next/prev hunk
<leader>ghs Stage hunk
<leader>ghr Reset hunk
<leader>ghp Preview hunk

Diagnostics & Trouble

Key Action
<leader>xx Toggle Trouble (diagnostics)
<leader>xX Buffer diagnostics
<leader>xL Location list
<leader>xQ Quickfix list
<leader>cs Document symbols (outline)

AI (opencode)

Key Action
<C-q> Ask opencode about selection
<C-x> Execute opencode action
<C-.> Toggle opencode panel
go + motion Add range to opencode
goo Add current line to opencode

Power Moves to Master First (Priority Order)

  1. s{2chars} — flash jump replaces 80% of navigation
  2. <leader><space> — open any file instantly
  3. <leader>sg — grep across entire project
  4. cgn — change + repeat for multi-cursor-like renaming
  5. <leader>sr — grug-far for project-wide replace
  6. gd<C-o> — dive into definition, jump back
  7. <leader>ss — symbol outline for large files
  8. zR / zM — fold management for code overview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment