Vim 插件

只列出了我常用的操作

surround

操作快捷键效果
插入ysiw'abc -> ‘abc’
ysiwtabc -> abc
ys3w)print a,b -> print (a,b)
ys$)print a,b -> print (a,b)
vwwS"print a,b -> print “a,b”
替换cs"'“abc” -> ‘abc’
csw'abc def! -> abc ‘def’!
csW'abc def! -> abc ‘def!’
cs)](abc) -> [abc]
cs){(abc) -> { abc }
删除ds'‘abc’ -> abc
ds((abc)def -> abcdef
dst
abc
->
abc

commentary

操作快捷键效果
注释gccabc -> //abc
gcapabc -> //abc
取消注释gcu//abc -> abc

argtextobj

操作快捷键效果
删除daafunction(arg1, arg2) -> function(arg1)
更改ciafunction(arg1, arg2) -> function(arg1, )
ciafunction(arg1, arg2, arg3) -> function(arg1, arg2, arg3)
ciafunction(arg1, func(a1, a2)) -> function(arg1, )

exchange

操作快捷键效果
替换cx{motion}abcdef123 -> abc123def
替换linecxxabc -> 123
visual modeXcx
清除缓存cxc

textobj-entire

操作快捷键效果
删除dae/die

easymotion

操作快捷键效果
搜索f搜索
搜索s搜索

replace with register

操作快捷键效果
粘贴gr{motion}abcdef -> abcabc

NERDTree

操作快捷键效果
Tree打开关闭ctrl+n
光标在目录树与文件间切换ctrl+w+w
切换到前一个tabg+T
切换到后一个tabg+t
在新 Tab 中打开选中文件/书签,并跳到新 Tabt
关闭当前的 tab:tabc
关闭所有其他的 tab:tabo

paragraph-motion

操作快捷键效果
shift + {/}段落移动即使空格行也算
comments powered by Disqus