1 #include <stdio.h>
2 int main(int argc, char* argv[]) {
3 int i=10;
4 /* } */
5 return 0;
6 }
如果光标在
{
下的第2行,我按下%键,光标会显示在第4行(已注释)的匹配闭括号上,而不是第6行的匹配闭括号。有没有什么解决方法?1 #include <stdio.h>
2 int main(int argc, char* argv[]) {
3 int i=10;
4 /* } */
5 return 0;
6 }
{
下的第2行,我按下%键,光标会显示在第4行(已注释)的匹配闭括号上,而不是第6行的匹配闭括号。有没有什么解决方法?
:h matchit
,如果未定义b:match_words,则具有带有注释跳过的标准%。大多数ftplugins都会设置b:match_words,如果您不想在某个文件类型中使用它,请尝试在vimrc中使用autocmd取消设置。 - gravious