0

I am trying to install the vim (7.4) surround extension on Arch Linux (downloaded and installed this week) within an Oracle VM on a Windows 7 host.

I am getting a variety of errors including E388 (Could not find definition) when on "Hello World" with my cursor inside the quotes I try:

:ds"

And E257 (cstag: tag not found) when on <div>Hello World</div> with my cursor inside the tags I try something like:

:cst<p>

I have downloaded the most recent version of vim surround from git

I have :set nocp

I have placed surround.vim in ~/.vim/plugin

I have restarted vim

I have regenerated the helptags, and :help surround does work.

I extracted the files as the user running vim, there is no permission error.

Running :scriptnames shows ~/.vim/plugin/surround in the list.

So as far as I can tell it is installed, just that it is not working. Any ideas?

Axiombadger
  • 161
  • 10

1 Answers1

5

Surround is almost certainly working correctly, you just don't know how to use it and/or don't understand the difference between "Ex" commands and normal mode commands.

  • :ds is the short form of :dsplit, see :help :dsplit.
  • :cst is the short form of :cstag, see :help :cstag.

They are "Ex" commands, but Surround's ds and cst are not "Ex" commands: they are normal mode commands.

Instead of doing:

:ds"
:cst<p>

do:

ds"
cst<p>

And… Read The Fantastic Manual: :help surround.

romainl
  • 186,200
  • 21
  • 280
  • 313