Skip to main content
3 of 3
added 124 characters in body
Chris Davies
  • 128.5k
  • 16
  • 179
  • 325

Here is an example. Suppose you have this code and you press %, the cursor jumps between { and } parens:

enter image description here

matchit.vim extends this functionality, you can do the same with () just move cursor on ( and press %, it jumps between pairs of parenthesis ( )'s, { }'s, [ ]'s. It also jumps between opening and closing tags of C style comments /* and */. And it's smart enough to jump between C preprocessor directives - from #if to #endif and match #elif or #else in between

For more info refer to catonmat.net and vim.org. Note that since vim 6.0, matchit.vim has been included in the standard vim distribution, under the macros/ directory.

Rahul Patil
  • 25.6k
  • 26
  • 86
  • 96