刚安装了surround.vim插件,有些命令不能正常工作。我以this question为例
This is a lo*ng line and I want to highlight two wordsys2aw"应将上述内容更改为
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有人知道这里出了什么问题吗?
发布于 2012-10-04 04:52:45
我弄清楚了,为了更容易地在vim和其他所有东西之间复制/粘贴,我在我的.vimrc文件中有以下规则:
set clipboard=unnamedplus这会使surround.vim的行为不正确。相反,我所做的是将以下行添加到我的.vimrc文件中,以允许我打开/关闭这一所需的行为
nnoremap <leader>hf :set clipboard=unnamedplus<CR>
nnoremap <leader>fh :set clipboard-=unnamedplus<CR>现在surround.vim照常工作了
https://stackoverflow.com/questions/12715593
复制相似问题