sponsor Vim development Vim logo Vim Book Ad

scmCloseParens : Lets you easily close all open parens up to the cursor line.

 script karma  Rating 12/3, Downloaded by 514  Comments, bugs, improvements  Vim wiki

created by
Adrien (Axioplase::Pied)
 
script type
utility
 
description
Lets you easily close all open parens up to the cursor line.

I tested it quickly with Scheme, but it should also work with Lisp.

(define foo
  (lambda(x)
    (+ x 1

Put your cursor on the last line (or below), and type <Leader>p
It will become

(define foo
  (lambda(x)
    (+ x 1)))

I chose "p" as in "parens", for it is easy to remember. I would have preferred "c" as in "close", but <leader>c is already taken by the good EnhancedCommentify :D


I apologize for this script beeing a dirty quick hack, but writing in vim's script language is a real pain, and this script is enough useful to me to choose to share it.
I should at least clean it by the following weeks.
 
install details
simply drop it into .vim/plugin/ that should be enough.
 

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
scmCloseParens.vim 0.1 2007-05-04 7.0 Adrien (Axioplase::Pied) Initial upload
ip used for rating: 3.143.228.40

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