配置文件添加函数和键映射如下:function! s:surround() let word = expand("<cword>") let wrap= input("wrap with: ") let command = "s/".word."/".wrap.word.wrap."/" execute command endfunction nmap cx :call <SID>surround()<CR>这样normal模式光标放在单词上,然后使用快捷键cx,会提示两边填充的字符,输入字符回车即可。 详细内容请参考:How to repeatedly add text on both si...
配置文件添加函数和键映射如下:
这样normal模式光标放在单词上,然后使用快捷键cx,会提示两边填充的字符,输入字符回车即可。
详细内容请参考:How to repeatedly add text on both si...