Vim 脚本突出显示标签的结尾,如大括号 [英] Vim Script to hightlight end of a tag like braces

查看:49
本文介绍了Vim 脚本突出显示标签的结尾,如大括号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当光标位于标签的开头时,我需要一个 Vim 脚本来突出显示标签的结尾.

I need a Vim script to highlight end of a tag when cursor is at the beginning of the tag.

例如在html标签中,当光标在标签的开头时,它应该突出标签的结尾.

For example in html tags, when cursor is in start of tag, it should highlight the end of the tag.

界面应该是通用的,以便可以添加更多标签

The interface should be generic, so that more tags can be added

推荐答案

如果您将 html.vim 文件替换为 这个 一个,你会得到 html 标签匹配加上一些额外的东西.或者你可以使用 matchit ,这是更通用的.

If you replace your html.vim file with this one, you'll get the html tag matching plus some extra stuff. Or you can use matchit which is more general purpose.

这篇关于Vim 脚本突出显示标签的结尾,如大括号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆