Clojure-Vim cheatsheet

help

  • :help {topic}<Enter> or :help {topic}<ctrl+d>
  • navigate with ctrl+] (go), ctrl+o (back), ctrl+i (forward)
  • Vimtutor contents listed here

windows

  • windows size: ctrl+w _ (all vert space), ctrl+w | (all hor space), ctrl+w = (equal)
  • snap window to side: ctrl+w shift+H/J/K/L
  • move to window: ctrl+w w (next), ctrl+w h/j/k/l (direction)

tabs

  • next tab: gt, previous tab: gT, tab in position i: {i}gt
  • back-and-forth between two tabs: <Leader>tl (.vimrc)

copy-pasting

  • "+ to copy to system clipboard

auto-complete

  • ctrl+n: find next match
  • ctrl+p: find previous match

NerdTree

  • open/close with ctrl+n (.vimrc)
  • ? while open for keybindings

GitGutter

  • see diff: <Leader>hp

vim-commentary

  • gcc (un)comment line

vim-sexp

  • cse(,cse),cseb: surround element in parentheses
  • cse[, cse]: surround element in brackets

vim-fireplace

  • :Require: reload current namespace
  • :Require!: reload all namespaces
  • :Eval: eval/print the outermost form for the current line
  • :%Eval: eval/print whole file
  • cpp: eval/print the innermost form at the cursor
  • cp{motion}: eval/print motion, e.g. $ or _
  • K: show Clojure docs for symbol under cursor