在线咨询 切换到宽版
eetop公众号 创芯大讲堂 创芯人才网

 找回密码
 注册

手机号码,快捷登录

手机号码,快捷登录

搜全文
查看: 6567|回复: 12

[求助] 关于gvim的一个功能

[复制链接]
发表于 2015-5-13 10:25:43 | 显示全部楼层




   楼上说的是matchit插件:Examples:        Suppose you >                :let b:match_words = '<:>,<tag>:</tag>'<        and hit "%" with the cursor on or before the "<" in "a <tag> is born".        The pattern '<' comes first, so it is preferred over '<tag>', which        also matches.  If the cursor is on the "t", however, then '<tag>' is        preferred, because this matches a bit of text containing the cursor.        If the two groups of patterns were reversed then '<' would never be        preferred.        Suppose you >                :let b:match_words = 'if:end if'<        (Note the space!) and hit "%" with the cursor at the end of "end if".        Then "if" matches, which is probably not what you want, but if the        cursor starts on the "end " then "end if" is chosen.  (You can avoid        this problem by using a more complicated pattern.)


http://ftp.stust.edu.tw/vim/runtime/macros/matchit.txt
回复 支持 反对

使用道具 举报

发表于 2015-5-13 10:26:25 | 显示全部楼层


   
回复  icfbicfb


   谢谢,记得好像可以在vimrc里面设置自定义关键字的,比如module-endmodule等,以前 ...
logue 发表于 2015-5-12 22:31




   楼上说的是matchit插件:
Examples:        Suppose you >                :let b:match_words = '<:>,<tag>:</tag>'<        and hit "%" with the cursor on or before the "<" in "a <tag> is born".        The pattern '<' comes first, so it is preferred over '<tag>', which        also matches.  If the cursor is on the "t", however, then '<tag>' is        preferred, because this matches a bit of text containing the cursor.        If the two groups of patterns were reversed then '<' would never be        preferred.        Suppose you >                :let b:match_words = 'if:end if'<        (Note the space!) and hit "%" with the cursor at the end of "end if".        Then "if" matches, which is probably not what you want, but if the        cursor starts on the "end " then "end if" is chosen.  (You can avoid        this problem by using a more complicated pattern.)
回复 支持 反对

使用道具 举报

发表于 2015-5-13 10:26:58 | 显示全部楼层


   
回复  icfbicfb


   谢谢,记得好像可以在vimrc里面设置自定义关键字的,比如module-endmodule等,以前 ...
logue 发表于 2015-5-12 22:31



楼上说的是matchit插件
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

X 关闭广告

手机版| 小黑屋| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 ) |网站地图

GMT+8, 2025-10-21 20:04 , Processed in 0.012468 second(s), 4 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表