VimTip 6:百分号"%"的用途
"%"可以用来:
1.跳转到一个成对出现的左半边
或者右半边的圆括号()、方括号
[]或者大括号{}afasdf
2.跳转到一个C语言风格注释的 开头或结尾
3.跳转到完整出现的C预处理条 件从句:#if,#ifdef,
#else,#elif,#en
dif
如果需要关于"%"的详细信息, 请在VIM的命令状态下输入:
:help %
通过修改"matchpairs "选项,"%"可以被扩展到定位
其他的成对出现的符号。输入
:help matchpairs获得更多的 帮助。
"%"可以用来:
1.跳转到一个成对出现的左半边
2.跳转到一个C语言风格注释的
3.跳转到完整出现的C预处理条
如果需要关于"%"的详细信息,
:help %
通过修改"matchpairs
:help matchpairs获得更多的
原文:
---------------
VimTip 6: Using the % key
http://vim.sour
The % key can be used
1. To jump to a matching opening or closing parenthesis, square
bracket or a curly brace i.e. ([{}])
2. To jump to start or end of a C-style comment /* */.
3. To jump to a matching #if, #ifdef, #else, #elif, #endif C
preprocessor conditionals.
To get more information about this, do
:help %
The % key can be extended to support other matching pairs by
modifying the "matchpairs" option. Read the help on
:help matchpairs