Skip to content

Latest commit

 

History

History
104 lines (76 loc) · 4.84 KB

README.md

File metadata and controls

104 lines (76 loc) · 4.84 KB

Calva Paredit

Structural editing and navigation for Clojure and other LISPs

This is a Paredit extension for Visual Studio Code. It is a thin wrapper around paredit.js. You find it inside Code's extension view and on the Marketplace.

Part of Calva

Calva Paredit can be used standalone, but also comes bundled with Calva, a Clojure and ClojureScript extension for bringing the REPL power into VS Code, together with Calva Formatter, a Clojure code formatter.

Commands

Note: You can choose to disable all default key bindings by configuring calva.paredit.defaultKeyMap to none. (Then you probably also want to register your own shortcuts for the commands you often use.)

Navigation

Default keybinding Action
ctrl+right Forward Sexp
ctrl+left Backward Sexp
ctrl+down Forward Down Sexp
ctrl+up Backward Up Sexp
ctrl+alt+right Close List

Selecting

Default keybinding Action
ctrl+w Expand Selection
ctrl+shift+w Shrink Selection
ctrl+alt+w space Select Current Top Level Form

Editing

Default keybinding Action
ctrl+alt+. Slurp Forward
ctrl+alt+< Slurp Backward
ctrl+alt+, Barf Forward
ctrl+alt+> Barf Backward
ctrl+alt+s Splice
ctrl+alt+shift+s Split Sexp
ctrl+delete Kill Sexp Forward
ctrl+shift+backspace (on Mac) Kill Sexp Forward
ctrl+backspace Kill Sexp Backward
ctrl+alt+down Splice & Kill Forward
ctrl+alt+up Splice & Kill Backward
ctrl+alt+( Wrap Around ()
ctrl+alt+[ Wrap Around []
ctrl+alt+{ Wrap Around {}
ctrl+alt+i Indent
--- Transpose
Strict mode keybinding Action
backspace Delete Backward, unless it will unbalance a form
delete Delete Forward, unless it will unbalance a form
shift+backspace (on Mac) Delete Forward, unless it will unbalance a form
ctrl+alt+backspace Force Delete Backward
ctrl+alt+delete Force Delete Forward
alt+shift+backspace (on Mac) Force Delete Forward

NB: Strict mode is disabled by default. If you ensable it, the backspace and delete keys won't let you remove parentheses or brackets so they become unbalanced. To force a delete anyway, use the supplied commands for that. Strict mode can be switched on by by configuring calva.paredit.defaultKeyMap to strict.

Copying/Yanking

Default keybinding Action
ctrl+alt+c ctrl+right Copy Forward Sexp
ctrl+alt+c ctrl+left Copy Backward Sexp
ctrl+alt+c ctrl+down Copy Forward Down Sexp
ctrl+alt+c ctrl+up Copy Backward Up Sexp
ctrl+alt+c ctrl+alt+right Copy Close List

Cutting

Default keybinding Action
ctrl+alt+x ctrl+right Cut Forward Sexp
ctrl+alt+x ctrl+left Cut Backward Sexp
ctrl+alt+x ctrl+down Cut Forward Down Sexp
ctrl+alt+x ctrl+up Cut Backward Up Sexp
ctrl+alt+x ctrl+alt+right Cut Close List

Maintained by Better Than Tomorrow

  • Peter Strömberg
  • You?

I also published and maintain Calva, another Visual Studio Code extension. Calva is aimed at making it super easy to get Clojure and Clojurescript coding done. It sports interactive REPLs, inline evaluation and other stuff people from the Emacs Cider world are used to.

Happy Coding

PRs welcome, file an issue or chat @pez up in the #calva-dev channel of the Clojurians Slack. Tweeting @pappapez works too.

#editors in Clojurians Slack

❤️