Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple cheat sheet for vim fireplace and paredit

fireplace

  • cpr => (require ... :reload)
  • cpR => (require ... :reload-all)

Evaluation

  • :Eval (clojure code) => runs (clojure code) in repl
  • cpp => evaluate inn-most expessions under cursor
  • cp<movement> => evaluate text described by <movement>
  • cqp => opens quasi-repl
  • cqc => quasi-repl command line window
  • cq<movement> => prefill quasi-repl command line window with text described by <movement>
  • :lopen => show stack trace after an exception was thrown

Getting help

  • :Doc <symbol> => show docstring of <symbol>
  • K => show docstring of command under cursor
  • :Source <symbol> => show source for <symbol>
  • [d => show source for symbol under cursor

Movement

  • ] C-D => jump to definition
  • gf => got to file (also works on namespaces)

paredit

Movement

  • [[ => jump to previous defun
  • ]] => jump to next defun

List Editing

  • <Leader>< => move delimiter left
  • <Leader>> => move delimiter right
  • <Leader>J => join cursor surrounding lists/strings
  • <Leader>O => split lists/string at cursor position

Wrapping

  • <Leader>W => wrap current symbol in parens
  • <Leader>w( => wrap current symbol in parens
  • <Leader>w[ => wrap current symbol in square brackets
  • <Leader>w{ => wrap current symbol in curly braces
  • <Leader>w" => wrap current symbol in double quotes

Splicing

  • <Leader>S => splice list into containing list
  • <Leader><Up> => splice by deleting everything backward
  • <Leader><Down> => splice by deleting everything forward
  • <Leader>I => replace current list with current symbol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.