在Vim中浏览HTML标签 [英] Navigating HTML tags in Vim
问题描述
我希望能够通过标记浏览HTML标记。有没有一种方法可以从HTML标签移动到标签。 (即 *< div> hi< / div>< div> bye< div> / div> *< div> bye< / div>
我知道 cit
和 / code>,这就是为什么我会想象这是可能的。谢谢!
matchit.vim
宏可以让你在大多数情况下都可以使用%
来移动到结束标签,就像匹配parens或大括号它包含在许多Vim发行版中,包括标准下载,但通常在默认情况下不会启用。 http://www.vim.org/scripts/script.php?script_id=39
I would like to be able to navigate through HTML tag by tag. Is there a way I can move from HTML tag to tag. (i.e. *<div>hi</div><div>bye</div>
---> <div>hi</div>*<div>bye</div>
I know about cit
and cat
, which is why I would imagine this is possible. Thanks!
The matchit.vim
macro gets you most of the way there, allowing you to move to a closing tag with %
as you would matching parens or braces. It's included in many Vim distributions including the standard download, but often not enabled by default.
http://www.vim.org/scripts/script.php?script_id=39
这篇关于在Vim中浏览HTML标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!