opinion: 'set showmatch'?

59 views
Skip to first unread message

Jeffrey 'jf' Lim

unread,
Aug 28, 2016, 2:10:36 AM8/28/16
to vim...@googlegroups.com
I'm in the process of relooking at my .vimrc, and I remember years ago
coming across this recommendation to do 'set sm', to help reduce
errors when typing brackets. IIRC, this was really helpful back then,
because there was no other way to see the matching LP when typing an
RP without 'set sm'.

But now playing with my settings, it appears that somewhere along the
way, vim added "highlight match" to its behaviour, and now without
'set sm', I can see the matching LP when typing an RP. So I'm just
wondering: what do folks thinking about 'set sm'?

On another note, how do I tweak the colour (both foreground, and
background) of the highlight?

thanks,
-jf

--
He who settles on the idea of the intelligent man as a static entity
only shows himself to be a fool.

Jeffrey 'jf' Lim

unread,
Sep 6, 2016, 1:45:58 PM9/6/16
to vim...@googlegroups.com
hi folks, just wondering, nobody no opinions? Just wondering how the
'set showmatch' behaviour works for folks vs just relying on the
highlight. Also - how do you tweak the colour for the matching
highlight?

-jf

Tumbler Terrall

unread,
Sep 6, 2016, 1:59:44 PM9/6/16
to vim_use

> hi folks, just wondering, nobody no opinions? Just wondering how the
> 'set showmatch' behaviour works for folks vs just relying on the
> highlight. Also - how do you tweak the colour for the matching
> highlight?

I have them both on. I like seeing the jump as it's more visually obvious, but also having the highlight on for when I'm just looking at code and not writing it is really nice too.

As far as how to change it, that would be the highlight group `MatchParen`.

e.g.: hi MatchParen ctermbg=red guibg=red

John Little

unread,
Sep 11, 2016, 7:28:13 PM9/11/16
to vim_use
I use both. You may want to tune the 'matchtime' option; the default, 5, gives half a second which for me is too slow for typing parentheses. I use a 5 Hz cursor blink, so I set matchtime to 2.

Regards, John Little

Reply all
Reply to author
Forward
0 new messages