[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] brace matching

From: Thomas Dickey
Subject: Re: [vile] brace matching
Date: Sat, 2 Apr 2016 16:37:09 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Sat, Apr 02, 2016 at 01:23:20PM -0400, Wayne Cuddy wrote:
> On Sat, Apr 02, 2016 at 10:06:50AM -0700, Marc Simpson wrote:
> > On Sat, Apr 2, 2016 at 9:29 AM, Wayne Cuddy <address@hidden> wrote:
> > >
> > > Is it known that using the goto-matching-fence function on the { on line
> > > 1 below will move the cursor to the '}' on line 2 and not the one on
> > > line 4?
> > 
> > FWIW, this is traditional vi behaviour (unsurprisingly, given the lack
> > of contextual information).
> Huh, indeed you are correct. Hard to believe I never ran across this
> before. Nested brace blocks are handled correctly and I mistakenly
> thought the processing of fence-pairs was handled "specially" in
> cppmode to account for things like this. I figure for 99% of use cases
> the traditional vi behavior is useless.
> When vim is in 'nocompatible mode' it does what's expected. I'm
> assuming vile doesn't have an option to enable this behavior. 

That's correct.  I have a note from 2001 regarding vim, and seem to
recall some discussion about making vile do this, suggesting that it
would be possible to use the syntax coloring information to limit the
choices of fence matching.  (I'd have to dig into vim's code, but my
recollection was that its behavior was hardcoded, assuming C language
syntax -- Perl can be a bit harder).

Thomas E. Dickey <address@hidden>

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]