插件名稱
- 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>