vim-surround,cs命令E319:对不起,此版本中没有该命令

时间:2010-11-29 04:06:17

标签: vim surround

我尝试为vim-surround执行cs命令。但是,不幸的是,我得到了E319:抱歉,此版本消息中没有该命令。我使用http://amix.dk/vim/vimrc.html

中的vimrc

这是我的Vim版本:

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 +multi_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"

由于

1 个答案:

答案 0 :(得分:0)

您安装了surround.vim吗?

环绕功能不是内置在Vim中,但需要我提到的插件。

因此,即使你使用了其他人的.vimrc,你也应该安装插件。请参阅安装说明链接。 (您可能会在github上找到最新版本。)

您应该手动安装插件(即在〜/ .vim /目录中手动下载和复制文件),或者使用.vimrc文件开头提到的svn,但我不确定你会不会以这种方式获得最新的插件版本。

编辑: 如果正确安装了环绕声,请输入
:verbose map

在长命令列表中,您应该看到类似的内容:

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

surround.vim文件的路径可能因安装而异,但您应该看到定义的命令。