如何才能在Vim中关闭HTML标签快? [英] How can one close HTML tags in Vim quickly?

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

问题描述

它已经一段时间,因为我已经做任何类似HTML code在Vim的,但最近我碰到这个又来了。说我正在做一个HTML页面的简单一点:

It's been a while since I've had to do any HTML-like code in Vim, but recently I came across this again. Say I'm doing a simple bit of a HTML page:

<html><head><title>This is a title</title></head></html>

我如何写标题,头部的结束标记并迅速html的下来吗?我觉得我在这里失去了一些非常简单的方法,不涉及我经历一个写他们都下来之一。当然,我可以使用<大骨节病>控制 <大骨节病> P 自动完成各个标签的名称,但什么打动了我我的笔记本电脑键盘上实际得到括号和斜线的权利。

How do I write those closing tags for title, head and html down quickly? I feel like I'm missing some really simple way here that does not involve me going through writing them all down one by one. Of course I can use CtrlP to autocomplete the individual tag names but what gets me on my laptop keyboard is actually getting the brackets and slash right.

推荐答案

检查了这一点。

closetag.vim

closetag.vim

Functions and mappings to close open HTML/XML tags

<一个href=\"http://vim.sourceforge.net/scripts/script.php?script_id=13\">http://vim.sourceforge.net/scripts/script.php?script_id=13

我用类似的东西。

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

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