How do I get vim to highlight matching parenthesis

1,863 views
Skip to first unread message

Aman Jain

unread,
Oct 23, 2008, 10:14:13 PM10/23/08
to vim_use
Hi

When I browse code, I need to see opening and closing parenthesis/
brackets, and pressing "%" seems unproductive.

I tried :set showmatch, but it makes the cursor jump back and forth
when you type in a bracket.
But what to do if I am browsing already written code.

Thanks
Aman Jain
India

Tony Mechelynck

unread,
Oct 24, 2008, 7:46:56 AM10/24/08
to vim...@googlegroups.com

The matchparen plugin (see ":help matchparen") normally works when the
cursor is on a ( [ { } ] or ) to show you its mate (if it's on-screen,
of course) in a distinctive colour. If you earlier disabled it, you can
reenable it by removing the line ":let loaded_matchparen = 1" from your
vimrc.


Best regards,
Tony.
--
The people of Halifax invented the trampoline. During the
Victorian period the tripe-dressers of Halifax stretched tripe across a
large wooden frame and jumped up and down on it to `tender and dress'
it. The tripoline, as they called it, degenerated into becoming the
apparatus for a spectator sport.

The people of Halifax also invented the harmonium, a device for
castrating pigs during Sunday service.
-- Mike Harding, "The Armchair Anarchist's Almanac"

Reply all
Reply to author
Forward
0 new messages