# Neovim Navigation **Movement** in Neovim is central to efficiency. Use dedicated keys instead of arrow keys (though they work) — they keep your hands near the home row. ## Character and word movement `h`, `j`, `k`, `l` — move left, down, up, right. Alternatives: arrow keys work but are slower. `H`, `M`, `L` — move to top, middle, bottom of screen (useful on large files). `w` — next word (cursor on start), `b` — previous word. `e` — next word end, `ge` — previous word end. `W`, `B`, `E` — same but on whitespace boundaries (treat punctuation as part of word). ```vim j j j " move down 3 lines 5w " jump 5 words forward ``` ## Line movement `0` — start of line (absolute column 0), `^` — first non-blank character, `$` — end of line, `g_` — last non-blank character. `|` — jump to specific column (e.g., `20|` moves to column 20). ## File movement `gg` — start of file (line 1), `G` — end of file (last line), `:N` — jump to line N. `:set number` shows line numbers for easier reference. `Ctrl+G` — display current line and column in status bar. Useful to know position without looking at line numbers. ## Search navigation `/pattern` — search forward, `?pattern` — search backward. `n` — next match, `N` — previous match. `*` — search for word under cursor forward, `#` — search backward. `gd` — go to definition of word under cursor (works in code with proper LSP). `gD` — go to global definition. ## Bracket and text object navigation `%` — jump to matching bracket/paren/brace. Works on `()`, `[]`, `{}`, and can be extended via settings. `(` and `)` — jump to previous/next sentence (a sentence ends with `.!?`). `{` and `}` — jump to previous/next paragraph (blank line separated). ## In-file jumps `Ctrl+O` — jump back to previous location (open old position), `Ctrl+I` — jump forward (redo the jump). Creates a jump stack so you can backtrack through edits. `[count]G` — prefix any command with a count. `10G` jumps to line 10, `10j` moves down 10 lines. ```vim /function_name " search for function n " next occurrence :%s/old/new/g " replace all (with navigation) ``` Common patterns: search a term with `/`, then `n` to cycle through, or use `*` on cursor word.