刚刚安装了surround.vim插件,有些命令无法正常工作。我用这个问题作为的例子
This is a lo*ng line and I want to highlight two words
ys2aw"
应将上述内容更改为
This is a "long line" and I want to highlight two words
但对我来说,它改成了
This is a g and I want to highlight two words
其他时候它根本没有影响!我认为这与洋基队的记录有关。
当我输入ys
时,在右下角我可以看到它很快变为g@
最后,我确信没有其他插件像发出verbose map yss
命令那样干扰:
n yss <Plug>Yssurround
Last set from ~/.vim/plugin/surround.vim
n ys <Plug>Ysurround
Last set from ~/.vim/plugin/surround.vim
有人知道这里出了什么问题吗?
我想好了,为了更容易在vim和其他所有东西之间复制/粘贴,我在.vimrc
文件中有以下规则:
set clipboard=unnamedplus
这使得surround.vim
的行为不正确。相反,我所做的是在.vimrc
文件中添加以下行,以允许我打开/关闭
nnoremap <leader>hf :set clipboard=unnamedplus<CR>
nnoremap <leader>fh :set clipboard-=unnamedplus<CR>
现在CCD_ 8和正常一样工作