sponsor Vim development Vim logo Vim Book Ad

paredit.vim : Paredit Mode: Structured Editing of Lisp S-expressions

 script karma  Rating 464/138, Downloaded by 8310  Comments, bugs, improvements  Vim wiki

created by
Tamas Kovacs
 
script type
utility
 
description
Paredit performs structured editing of Lisp S-expressions in Vim. Paredit.vim is similar to paredit.el for Emacs. Paredit Mode tries to maintain the balanced state of matched characters (parenthesis marks, square and curly braces, double quotes). Matched characters are inserted and removed in pairs, also when working with a block of text (well, mostly). Paredit also implements many paredit.el s-expression handling functions, like Split/Join/Wrap/Splice/Raise. Slurpage and Barfage known from Emacs is also possible but in a different fashion: you don't move the list element in or out of the list, rather you move the opening or closing parenthesis over the element or sub-list.

Paredit.vim is also part of the Slimv plugin (http://www.vim.org/scripts/script.php?script_id=2531). Slimv is a SWANK client for Vim, similarly to SLIME for Emacs. Paredit.vim is extracted from Slimv for users who want to use a different SWANK client or don't need a SWANK client at all. In case you need structured editing together with the SWANK functionality then please install Slimv instead, you don't need to additionally install Paredit.

For more information see the included documentation.
 
install details
The plugin is installed the usual way: extract the zip archive into your vimfiles or runtime directory.
Please note that Paredit version numbers follow the Slimv versioning because paredit.vim is also part of Slimv.

See the included documentation for customization instructions.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
paredit0913.zip 0.9.13 2017-03-19 7.0 Tamas Kovacs Always leave cursor to opening char's pos after wrapping selection.
Fix possible cursor move problem caused by &indentexpr when using the c operator.
Bugfix: 2 keymaps assumed g:paredit_leader is identical to ','.
Fix for paredit 'x' and 'X' when clipboard=unnamed.
Added support for hy.
Use <Leader> instead of mapleader.
Enhanced detection of forms balanced state.
Unescaped square brackets in balance detection.
Bugfix: pressing <Tab> (for completion) followed by ')'.
Remove invalid uses of `call`.
Fixed problem with 'x' and 'X' commands when erasing multi-byte unicode character.
Fix Paredit burfing (by moving parens left or right) when there are stings as elements.
Added paredit support for shen language.
Do not skip parens after \\ when searching for pairs.
paredit0912.zip 0.9.12 2013-12-29 7.0 Tamas Kovacs Add Racket support for delimiter '[]' and '{}' (by Jimmy Lu).
Fixed ,< and ,> when 'whichwrap' contains 'h' and 'l'.
paredit0911.zip 0.9.11 2013-09-09 7.0 Tamas Kovacs Added options g:paredit_disable_clojure, g:paredit_disable_lisp, g:paredit_disable_scheme. Added repeat.vim support to many Paredit modification actions (by Logan Campbell). Returning cursor to start position after " wrap (by Logan Campbell). Do not insert newline if item is selected in completion popup menu by pressing <CR>. Delete into the "*" register when option clipboard=unnamed. Handle #"" regexp syntax definition also when searching for paren matches. Bugfixes: Wrap accomodates strings (thanks to Colin Jones). Don't move cursor for v) when selection mode is inclusive (by John Szakmeister).
paredit0910.zip 0.9.10 2013-04-02 7.0 Tamas Kovacs Paredit initialization on filetype instead of filename extension. Do not permanently set 'iskeyword'. Added '^' macro prefix. Treat #_(...) type of clojure comments as regular forms. Handle VimClojure's #"" regexp syntax definition. Bugfixes: 'cc', 'Vc' did not delete line. 'd', 'c', 'vc', 'cW' cursor positioning problems. 'C' extra whitespace and trailing ". Reset indent after 'cc'. 'dd', ',>' EOL problem. Indentation when 'indentexpr' takes no argument (thanks to Tim Pope). Keep cursor inside "" when deleting over trailing " via 'cW', 'C', etc. Use &ft instead of SlimvGetFiletype().
paredit099.zip 0.9.9 2012-11-20 7.0 Tamas Kovacs Handle [] and {} delimiters in Scheme like in Clojure. Ignore (, [, or { when preceded by \.
paredit098.zip 0.9.8 2012-08-18 7.0 Tamas Kovacs Delete empty lines when re-gathering Electric Returns. Special handling of cw, cb, ciw, caw supporting repeat ('.'). Bugfixes: PareditToggle ckecks if buffer was registered for Paredit. Electric Return re-gathering at end of line with no virtualedit. Extra character at the end of selection using 'v('. Paredit 'x' at end of line when 'whichwrap' includes h,l. Paredit Wrap when line ends in a multibyte character (thanks to Sung Pae).
paredit097.zip 0.9.7 2012-05-29 7.0 Tamas Kovacs Identify VimClojure REPL prompt position (thanks to David Greenberg). Added <leader><Up> for Splice-killing-backward, <leader><Down> for Splice-killing-forward, <leader>I for Raise. Added 'Electric Return' feature and new option g:paredit_electric_return.
paredit096.zip 0.9.6 2012-04-01 7.0 Tamas Kovacs Initial upload
ip used for rating: 3.135.213.214

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github