Tad Bytes of Technology
Tips, tricks, and helpful notes.
Pages
Home
Contents
Thursday, July 19, 2012
Vim - Matching Braces
Matching {}, (), [], /* */, can be very helpful when using vi to read a program code.
In command mode, take your cursor to one of the start/end braces or comment mark and press %, that is, Shift + 5 on most keyboards.
Another useful trick is to highlight the code between the matching tags, and can be achieved simply by:
:noremap % v%
References
http://vim.wikia.com/wiki/Moving_to_matching_braces
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment