0

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?

narnie
  • 1,742
  • 1
  • 18
  • 34

1 Answers1

2

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
ibab
  • 924
  • 7
  • 15
  • I tried nocompatible mode once. Couldn't stand it!!! HAHA! I'm not in nocompatible. Thanks for the git site. – narnie Mar 07 '12 at 01:39
  • Just cloned the latest git. It is still in version 1.9, but I'm still going to try it. Just tried it and it works. Perhaps someone has done something nefarious at http://www.vim.org/scripts/script.php?script_id=1697 That is concerning. Thanks for the idea, it fixed my problem. – narnie Mar 07 '12 at 01:45