开发者

vim-surround, cs command E319: Sorry, the command is not available in this version

I tried to execute the cs command for vim-surround. But, unfortunately, I got the E319: Sorry, the command is not available in this version message. I use the vimrc from http://amix.dk/vim/vimrc.html

This is my Vim version:

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Nov 27 2010 19:38:25)
MacOS X (unix) version
Included patches: 1-47
Compiled by dio@Dios-MacBook.local
Normal version with MacVim GUI.  Features included (+) or not (-):
-arabic +autocmd +balloon_eval +browse +builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl
+cmdline_hist +cmdline_info +comments -conceal +cryptv -cscope +cursorbind +cursorshape +dialog_con_gui +diff +digraphs
 +dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path +find_in_path +float +folding -footer
+fork() +fullscreen -gettext -hangul_input +iconv +insert_expand +jumplist -keymap -langmap +libcall +linebreak
+lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse +mouseshape -mouse_dec -mouse_gpm
-mouse_jsbterm -mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +mul开发者_JAVA百科ti_lang -mzscheme +netbeans_intg +odbeditor
-osfiletype +path_extra -perl +persistent_undo +postscript +printer -profile -python -python3 +quickfix +reltime
-rightleft +ruby +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar +transparency +user_commands
+vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11
-xfontset +xim -xsmp -xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"

Thanks


Have you installed surround.vim ?

The surround feature is not built-in in Vim but requires the plugin I mentioned.

So even if you used the .vimrc from someone else, you should also install the plugin. See the link for installation instruction. (You might find the latest version on github).

You should either install the plugins manually (i.e download and copy the files manually in your ~/.vim/ directory), or use svn as mentioned at the beginning of your .vimrc files, but I am not sure you'll get the latest plugin version that way.

Edit : If surround is correctly installed, by typing
:verbose map

in the long list of command you should see something like :

x s <Plug>Vsurround
Last set from ~\vimfiles\bundle\surround\plugin\surround.vim
n ySS <Plug>YSsurround
Last set from ~\vimfiles\bundle\surround\plugin\surround.vim n ySs <Plug>YSsurround
Last set from ~\vimfiles\bundle\surround\plugin\surround.vim
n yss <Plug>Yssurround
Last set from ~\vimfiles\bundle\surround\plugin\surround.vim
n yS <Plug>YSurround
Last set from ~\vimfiles\bundle\surround\plugin\surround.vim
n ys <Plug>Ysurround
Last set from ~\vimfiles\bundle\surround\plugin\surround.vim

The path of the surround.vim files may vary with your installation, but you should see the command defined.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜