vim-surround, cs 命令 E319: 抱歉,该命令在此版本中不可用

发布于 2024-10-04 12:05:12 字数 1840 浏览 1 评论 0原文

我尝试执行 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 [email protected]
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"

谢谢

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 [email protected]
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"

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

绝情姑娘 2024-10-11 12:05:12

你安装了 surround.vim 吗?

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

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

您应该手动安装插件(即手动下载并复制文件到 ~/.vim/ 目录中),或者使用 .vimrc 文件开头提到的 svn,但我不确定您是否会获得最新版本插件版本就是这样。

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

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

xsVsurround
最后一组来自 ~\vimfiles\bundle\surround\plugin\surround.vim
n ySS <插头>YSsurround
最后一组来自 ~\vimfiles\bundle\surround\plugin\surround.vim
n ySs <插头>YSsurround
最后一组来自 ~\vimfiles\bundle\surround\plugin\surround.vim
n yss <插头>Yssurround
最后一组来自 ~\vimfiles\bundle\surround\plugin\surround.vim
n yS <插头>YSurround
最后一组来自 ~\vimfiles\bundle\surround\plugin\surround.vim
n ys <插头>Ysurround
最后一组来自 ~\vimfiles\bundle\surround\plugin\surround.vim

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

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文