Repeating surround with “.” command in VIM

Deadly 提交于 2019-12-12 10:35:06

问题


Did anybody get surround.vim to work with repeat.vim?

This should enable you to repeat any command provided by the surround plugin with the "." command.

I think surround.vim should already have builtin support for the repeat plugin, so it should work out of the box but I can't get it to work.


回答1:


I just put surround.vim and repeat.vim in my .vim/plugins folder and tried it out. For me, it works like described.

May you try the repeat command on a function that is not supported. In the docs of surround.vim it says

 The "." command will work with ds, cs, and yss if you install repeat.vim

It does not say that all commands work with repeat.vim. E.g. the visual mode stuff (select multiple lines and surround them) does not work with repeat.vim




回答2:


You were right. It seems to only work on ds, cs and yss.

It also works, partially, on yse, ysiw, ysaw, ys2w. When you repeat a ysiw command it will stop at a prompt waiting for you to input a type of surrounding (i.e. b, B, r, ", t...).

Still no visual commands though. I hope there'll be future versions with added support for the rest of the commands.

Thanks for the answer.



来源:https://stackoverflow.com/questions/497485/repeating-surround-with-command-in-vim

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!