我如何在vim中快速找到close html标签? [英] how can I find the close html tag quickly in vim?

查看:184
本文介绍了我如何在vim中快速找到close html标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

就像编辑C源文件一样,我可以按%来获取当前游标的{}。
如何在编辑html文件时执行此操作?有没有捷径?
要清楚,我希望:

 < html> 
< / html>

当curosr移动到< html> ,我想按一个键,这样光标就会跳到< / html>

解决方案



当您的鼠标位于开始标记时,您应该可以通过输入%来使用matchit插件执行此操作。 href =http://www.vim.org/scripts/script.php?script_id=39 =noreferrer> http://www.vim.org/scripts/script.php?script_id=39 a>


Just like editing C source file, I can press % to get the closing } for the current cursor's {. How can I do this when editing html files? Is there any shortcuts? To be clear, I want:

<html>
</html>

When the curosr moves to <html> , I want to press a key, so that the cursor will jump to </html>.

解决方案

You should be able to do this with the matchit plugin by typing % when your mouse is on the opening tag.

http://www.vim.org/scripts/script.php?script_id=39

这篇关于我如何在vim中快速找到close html标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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