Re: How to stop showing matching braces?
- From: Tony Mechelynck <antoine.mechelynck@xxxxxxxxx>
- Date: Wed, 16 Apr 2008 10:45:33 +0200
On 16/04/08 10:13, YANSWBVCG wrote:
Gary Johnson<garyjohn@xxxxxxxxxx> wrote:Gary Johnson<garyjohn@xxxxxxxxxx> wrote:YANSWBVCG<daf@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:A better way to demonstrate that the cursor has not actually moved inThis { is some text } to test bracket display with.Yes, I know it _appears_ that the cursor jumps in your test, but
When I move the cursor starting from the 'T' in this,
upon encountering the left bracket, the cursor jumps
to the right bracket. There is no highlighting as
I have disabled it. Moving the cursor another position
to the right, the cursor jumps back to the space following
the left bracket. With the left bracket being highlighted,
entering append mode will cause the space to the right of
the right bracket to be highlighted. All this only in
xterm in kde.
actually it does not jump. You don't have to have syntax highlighting
enabled. I repeated your test by saving your message, deleting the
headers, then opening it in vim as
vim -X -N -u NORC -i NONE bracket_test
in an xterm with TERM set to a monochromatic xterm.
The cursor _appeared_ to move just as you described. However, you can
demonstrate that the cursor actually remains on that left bracket by
typing
rX
and observing that the left bracket changes to an X.
that scenario is to execute this command
hi MatchParen term=bold
then repeat your test. This also demonstrates that vim uses
highlighting even when syntax highlighting is not enabled.
Thanks for the tips.
I agree that the cursor does not actually move. Is there a way to
get the highlighting to move back to the cursor position after a
short pause?
The MatchParen highlight actually highlights _both_ paired brackets in the same colour. Whether both are noticeable may depend on whether it's gvim or Console Vim or on which colours are used.
Jumping to the matching bracket and back is another (older) option, see
:help 'showmatch'
and what it links to. It only works when _new_ brackets are inserted though.
Best regards,
Tony.
--
"One Saturday afternoon, during the campaign to decide whether or not
there should be a Coastal Commission, I took a helicopter ride from Los
Angeles to San Diego. We passed several state beaches, some crowded
and some virtually empty. They had the same facilities, and in some
cases the crowded and the empty beach were within a quarter mile of
each other. Obviously many beach-goers prefer to be crowded together.
Buying more beaches that people won't go to because they prefer to be
crowded together on one beach is a ridiculous waste of our natural
resources and our taxes."
-- Ronald Reagan
.
- References:
- Re: How to stop showing matching braces?
- From: Gary Johnson
- Re: How to stop showing matching braces?
- From: YANSWBVCG
- Re: How to stop showing matching braces?
- From: mallin.shetland
- Re: How to stop showing matching braces?
- From: YANSWBVCG
- Re: How to stop showing matching braces?
- From: Gary Johnson
- Re: How to stop showing matching braces?
- From: Gary Johnson
- Re: How to stop showing matching braces?
- From: YANSWBVCG
- Re: How to stop showing matching braces?
- Prev by Date: Re: How to stop showing matching braces?
- Next by Date: Re: Vimdiff path issue
- Previous by thread: Re: How to stop showing matching braces?
- Next by thread: Re: How to stop showing matching braces?
- Index(es):
Relevant Pages
|