在Vim中浏览HTML标签 [英] Navigating HTML tags in Vim

查看:148
本文介绍了在Vim中浏览HTML标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够通过标记浏览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屋!

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