Home

Awesome

Strict Paredit

Classic, Emacs Paredit-like Structural editing and navigation for Common Lisp, Clojure and Scheme.

<p align="center"> <a href="https://marketplace.visualstudio.com/items?itemName=ailisp.strict-paredit"><img width="128px" height="128px" src="https://github.com/ailisp/strict-paredit-vscode/raw/master/assets/paredit.png" title="Paredit icon"></img></a> </p>

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.

Commands

Note: You can choose to disable all default key bindings by configuring paredit.defaultKeyMap to none. (Then you probably also want to register your own shortcuts for the commands you often use. see ets/keys.json for example). By default the strict mode map is used. Below commands work in both strict mode and original mode. If you are new to Paredit, below shortcut in bond text is a small but very frequently used set of commands that helps in 95% of the time. I hightly recommend you memorize them to be efficient.

Navigation

Default keybindingAction
ctrl+rightForward Sexp
ctrl+leftBackward Sexp
ctrl+downForward Down Sexp
ctrl+upBackward Up Sexp
ctrl+alt+rightClose List

Selecting

Default keybindingAction
ctrl+wExpand Selection
ctrl+shift+wShrink Selection
ctrl+alt+wSelect Current Top Level Form

Editing

Default keybindingAction
ctrl+alt+.Slurp Forward
ctrl+alt+<Slurp Backward
ctrl+alt+,Barf Forward
ctrl+alt+>Barf Backward
ctrl+alt+sSplice
ctrl+alt+shift+sSplit Sexp
ctrl+deleteKill Sexp Forward
ctrl+shift+backspace (on Mac)Kill Sexp Forward
ctrl+backspaceKill Sexp Backward
ctrl+alt+downSplice & Kill Forward
ctrl+alt+upSplice & Kill Backward
ctrl+alt+9, Ctrl+alt+(Wrap Around ()
ctrl+alt+[Wrap Around []
ctrl+alt+{Wrap Around {}
ctrl+alt+iIndent
ctrl+alt+tTranspose

You can also select the sexp with ctrl+w then wrap around by typing (, [ or { and delete it with backsapce

Strict only keybinding

Strict mode keybindingAction
backspaceDelete Backward or move left if at )]}
deleteDelete Forward or move right if at )]}
shift+backspace (on Mac)Delete Forward or move right if at )]}
ctrl+alt+backspaceForce Delete Backward
ctrl+alt+deleteForce Delete Forward
alt+shift+backspace (on Mac)Force Delete Forward

NB: Strict mode is enabled by default. 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/off by configuring paredit.defaultKeyMap to strict/original.

Copying/Yanking

Default keybindingAction
ctrl+alt+c ctrl+rightCopy Forward Sexp
ctrl+alt+c ctrl+leftCopy Backward Sexp
ctrl+alt+c ctrl+downCopy Forward Down Sexp
ctrl+alt+c ctrl+upCopy Backward Up Sexp
ctrl+alt+c ctrl+alt+rightCopy Close List

Cutting

Default keybindingAction
ctrl+alt+x ctrl+rightCut Forward Sexp
ctrl+alt+x ctrl+leftCut Backward Sexp
ctrl+alt+x ctrl+downCut Forward Down Sexp
ctrl+alt+x ctrl+upCut Backward Up Sexp
ctrl+alt+x ctrl+alt+rightCut Close List

Maintainers

This project is forked from https://github.com/BetterThanTomorrow/calva-paredit. Original one is maintained by author Peter Strömberg as part of project calva, https://github.com/BetterThanTomorrow/calva

I maintain this fork with the following stress: