Quoting Bill McCarthy <[EMAIL PROTECTED]>: > Hello Vim List, > > I just tried out surround.vim, recently updated on Vim > Online. Nice plugin! > > It works fine when placed in my plugin directory but doesn't > work if moved to my AsNeeded directory and :MkAsNeeded is > run. > > Has anyone out there been able to get this to work?
I just tried surround.vim with v15g of AsNeeded (available from my website, http://mysite.verizon.net/astronaut/vim/index.html#ASNEEDED). No problems noted. I think I should point out that AsNeeded provides transparent support for plugin loading for commands and functions -- ie. issue a command, and if the associated plugin hasn't been loaded yet, it will be, and the command is then executed or the function executed. However, the surround.vim plugin is largely providing maps. AsNeeded supports maps; but not transparently. For surround.vim, for example: :AN cs will load the surround.vim plugin and make the cs map available. The reason why AsNeeded doesn't support transparent map use: consider what would happen if there are several plugins with maps: \a \ab \abc . If AsNeeded set up special maps for these, then the infamous pause-while-waiting-to-see-if-you're-going-to-type-more would appear. Given those three maps, assume you wanted \ab in plugin ab.vim. There'd be a delay after you typed \ab (because AsNeeded would have had to set up a map for \abc, and so vim would be waiting a bit to see if you were about to continue to type that "c". You'd continue to get those pauses every time you wanted to use the \ab map, too. Regards, Chip Campbell