質問
I have installed surround.vim into ~/.vim/plugin
I can select with "v", make my selection and then hit "s" or "S" followed by a single or double quote. Nothing happens (well, sometimes text is deleted, but no quoting happens)
I was wondering if any of my other plugins might be interfering, so I started vim with
vim -u ~/.vim/plugin/surround.vim
and still no dice.
In desperation, I tried
vim -u NONE
And sourced ~/.vim/plugin/surround.vim directly into vim.
Still didn't work. So I know it is not some other plugin interfering since the -u parameter prevents sourcing all other files but what follows (unless NONE follows where it sources nothing).
I also tried < Leader>s' (to try a single quote) using \s', still nothing happened. This was the latest version downloaded from http://www.vim.org/scripts/script.php?script_id=1697
BTW, if I do v [select text] S', then I get this error:
Error detected while processing function <SNR>12_opfunc2..<SNR>12_opfunc:
line 44:
E353: Nothing in register +
Any idea what is wrong?
解決
Sounds pretty strange. You might want to try these steps:
- Make sure that
nocompatible
is set. - Download the latest version with
git clone https://github.com/tpope/vim-surround.git