October 2012
346 pages
7h 40m
English
| Tip 54 | Jump Between Matching Parentheses |
Vim provides a motion that lets us move between opening and closing pairs of parentheses. By enabling the matchit.vim plugin, we can extend this behavior to work on pairs of XML tags as well as on keywords in some programming languages.
The % command lets us jump between opening and closing sets of parentheses (see %
). It works with (), {}, and [], as this example demonstrates:
| Keystrokes | Buffer Contents | ||
|---|---|---|---|
{start} |
| ||
% |
| ||
h |
| ||
% |
| ||
l |
| ||
% |
|
Read now
Unlock full access