Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sidec/f9dac9a122dfd93a14ec to your computer and use it in GitHub Desktop.
Save sidec/f9dac9a122dfd93a14ec to your computer and use it in GitHub Desktop.

Revisions

  1. @nblumoe nblumoe created this gist Apr 24, 2013.
    46 changes: 46 additions & 0 deletions vim_fireplace_paredit_cheat_sheet.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,46 @@
    ## 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