开发者

Making gVim behave like Notepad++ in terms of HTML syntax highlighting

In Notepad++ when you work with HTML, when you move the cursor onto a tag it automatically highlights that tag and its opening/closing corresponding tag. 开发者_运维问答That is really useful when you have lots of div inside each other.

How do you turn this on in gVim?


Not sure, but I don't think there's built in functionality or even a plugin to do that in Vim. There is a 'matchit.vim' plugin that extends the function of the bracket matching key ("%") so that it matches more than just brackets, can do tags in html files. That way when you press '%' on a tag in normal mode the cursor will jump to the matching open or close tag.

matchit.vim is included with Vim distributions in the 'macros' subdirectory. You can get more info by reading install instructions for it there, or here's link to the script's page at vim.org: http://www.vim.org/scripts/script.php?script_id=39

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜