[slim-vim] Fix Vim's () matching for Lisp

Brad Beveridge brad.beveridge at gmail.com
Thu Jun 22 12:44:59 CDT 2006


On 22/06/06, Larry Clapp <larry at theclapp.org> wrote:
> On Wed, Jun 21, 2006 at 08:38:47AM -0700, Brad Beveridge wrote:
> > Here is a little task that can be done in isolation.  I ran into
> > this the other day, the following Lisp form will give Vim's paren
> > matching (as it currently is) a nightmare
> >
> > (defun broken ()
> >   (let ((a 0))
> >      ;(if a  - parens in comments will be broken
> >      (if (char= a #\()   ; the characters #\( and #\) will screw Vim up
> >
> > So if you ever need to work with literal #\(, #\) or put partial
> > forms in comments then you will screw up Vim's paren matching.
> > Fixing this would be a nice little job.
>
> Ecl-repl has a partial solution to this.  Check Find_paren() in
> ecl-repl.vim.  In general, look at Vim's searchpair() function.
>
> -- L
>
> _______________________________________________
> slim-vim mailing list
> slim-vim at lispniks.com
> http://www.lispniks.com/mailman/listinfo/slim-vim
>

Also, look to ":help matchit" and $VIMRUNTIME/macros/matchit.vim for
examples of how to extend the matching ability of Vim

Brad


More information about the slim-vim mailing list