插件名称
- surround.vim
插件下载和安装
操作
初始文本
"hello world!"
将光标移动到双引号内,按
cs"'
'hello world!'
接着将光标放入其中,按
cs'<q>
<q>hello world!</q>
移除它,
cst"
hello world!
光标移动到
hello
上,按ysiw]
[hello] world!
将整行外加括号同时括号内再加一个空格
yss(
( [hello] world! )
删除括号
ds[ds)
hello world!
强调hello
<em>hello</em> world!
采用visual模式,按下V选定整行后 输入
S<p class="important">
<p class="important">
<em>hello</em> world!
</p>