Professional Documents
Culture Documents
Vim Tip
Vim Tip
Vim
has specific commands for programs in C (and similar languages like C++ and Java):
Use % to jump from an open brace to its matching closing brace. Or from a "#if" to
the matching "#endif". Actually, % can jump to many different matching items. It is
very useful to check if () and {} constructs are balanced properly.
Use [{ to jump back to the "{" at the start of the current code block.
Use gd to jump from the use of a variable to its local declaration.