Skip to content
Fayez edited this page Dec 28, 2020 · 5 revisions

Cursor Movement

  • h: Move left
  • j: Move down
  • k: move up
  • l: move right

Use can also use arrow keys.

  • b: move one word back

  • w: move one word forward

  • 0: move to the start of the line

  • ^: move to the first non-blank character of the line

  • }: jump to next paragraph/block

  • {: jump to previous paragraph/block

  • %: move to matching character (default supported pairs: '()', '{}', '[]' - use :h matchpairs in vim for more info)

  • gg: move to top of file

  • G: move to bottom of file

  • M: move to middle of file

Search

  • #: find word under cursor
  • /: Enter search string
  • ?: Same as / but search backwards
  • n: move to next search match
  • N: move to previous search match
  • fx: move cursor to next occurrence of x (can use any character)
  • tx: move cursor right before next occurrence of x
  • coh: toggle search highlighting on/off

Navigation

  • ]b: next buffer
  • [b: previous buffer
  • ];: next linting error
  • [;: previous linting error
  • g;: jumpt to last modification in the current buffer
  • ]c: next diff
  • [c: previous diff
  • CTRL+h: switch to left pane (can use j, k, l)

LeaderF

  • \ + ff: Open LeaderF file search
    • CTRL+j: move file selection down (k for up)
  • \ + fm: Open move recently used files list
  • \ + fb: Open list of open buffers

Quick formatting

  • >>: Indent once
    • 2>>: Indent twice (can use any number)
  • <<: Unindent
  • ==: re-indent current line
  • =%: re-indent block within (, {, [
  • zo: open fold
  • zc: close fold
Clone this wiki locally