[SGVLUG] Re: My Debian upgrade (boots faster)

Emerson, Tom (*IC) Tom.Emerson at wbconsultant.com
Thu May 3 09:43:27 PDT 2007


> -----Original Message----- Of David Lawyer
> > I just found a bug in the new version of the vim editor.  
> It doesn't 
> > seem to edit right inside of [brackets]. ...  Drat!  It's doing the 
> > same with ( and ).  There may be a way to stop this via a config. 
> > file.
> 			David Lawyer
> Please ignore the above, since I've found that vim works fine 
> on my computer console.  It only has the above bug on my 
> 24-year-old dumb terminal ...

Two things:

   "what it's doing" is parenthesis matching -- as you move the cursor
on/through/over a parenthesis or bracket, the program (briefly)
"highlights" the corresponding "other" parenthesis or bracket.  This is
to help you ensure lines like this:

  if ((((a<b) and (c>d)) or ((e+f) < g))

Are properly "matched up" -- in this case, it isn't (go ahead and count)
which would lead to compiler errors.

There should be an option to disable this -- a quick search reveals this
tip:
============================================
[http://www.vim.org/tips/tip.php?tip_id=200]
When one is inserting parentheses some folks like to see the cursor
bounce off the matching parenthesis.  To do that, put the following
map into your <.vimrc> file:

    inoremap ) )<c-o>%<c-o>:sleep 500m<CR><c-o>%<c-o>a

Adjust the time delay (its 500 milliseconds above) to suit your needs.

Additional Notes
----
cec at NgrOyphSon.gPsfAc.nMasa.gov, January 17, 2002 12:58
Somewhat better map:

  inoremap ) )<left><c-o>%<c-o>:sleep 500m<CR><c-o>%<c-o>a

There was a problem when inserting parentheses into previously
existing text which the <left> handles.
----
mbrubeck at hmc.edu, January 17, 2002 14:58
Vim 6 has this functionality built-in.  See the 'showmatch' and
'matchtime' options.
============================================

That last "tip" points out the setting you need to consider: SHOWMATCH

Second:

  You indicate the "bug" is really "in your 24 year old terminal" -- if
this worked previously, then I'd say one or two things happened: the VIM
maintainers now use a different terminal-control-sequence to "bounce"
the cursor over the corresponding symbol, or the "termtype" is now
different (which would cause curses to use a "different escape sequence"
as well) -- actually, I suspect the terminal "type" is being detected
differently rather than any explicit coding within VIM.  It may also be
that the "termcap database" has been changed for your existing terminal
(if the "termtype" that your system detects is still the same)

Admittedly, such a change is highly unlikely UNLESS someone got a wild
whatever up their <ahem> and decided to REMOVE some "really old term
types that nobody ever uses anymore" [HAH!]


More information about the SGVLUG mailing list