Vim Souround命令

问题描述 投票:0回答:1

我很难记住vim中的所有各种关键字。但是,https://github.com/tpope/vim-surround插件中的'surround'之类的东西非常有用。

是否有可能设置一个通用的文本命令,以便当我执行类似的操作时

 :surround (.)  

它将用]替换当前选择>

 (<current_selection>) 

或者如果我执行

  :surround preamble.somethingelse 

它将替换为当前选择:

preamble<current_selection>somethingelse

我很难记住vim中的所有各种关键字。但是,https://github.com/tpope/vim-surround插件中的“ surround”之类的东西非常有用。是否可以设置...

vim vim-plugin neovim
1个回答
0
投票

为了利用Surround.vim插件,您必须根据插件提供的内容进行自定义。对于可视模式,基本上就是这种映射(默认情况下映射到S):

© www.soinside.com 2019 - 2024. All rights reserved.