2

我想安装这个插件,所以首先我提取 zip 的内容,然后我这样做:

$ vim camelcasemotion.vba

然后我做:

:so %

但我收到此错误:

处理 /tmp/camelcasemotion.vba 时检测到错误:第 2 行:E492:不是编辑器命令:UseVimball 按 ENTER 或键入命令继续

在这里你有插件的页面。我已经安装了 vim 7.3 和 vimballPlugin,你可以在这里看到:

:/usr/share/vim/vim73/plugin$ ls
getscriptPlugin.vim  gzip.vim  matchparen.vim  netrwPlugin.vim  README.txt  rrhelper.vim  spellfile.vim  tarPlugin.vim  tohtml.vim  vimballPlugin.vim  zipPlugin.vi
4

3 回答 3

3

I feel you pain, and am - was - just going through the same issues.

What I did incorrectly was:

  • I put so /usr/share/vim/[some dirs]/vimballPlugin.vim" in my vimrc

I then did : scriptnames and saw that the plugin hadn't loaded, well, it wasn't on the list.

What I then did correctly was:

  • I actually sourced the plugin myself from within vim: so /usr/share/vim/[some dirs]/vimballPlugin.vim and it had loaded:

: scriptnames then gave

       :
       :
   22: ~/.vim/plugin_loadManually/Align.vba
   23: /usr/share/vim/vim73/plugin-manual/vimballPlugin.vim
   24: /usr/share/vim/vim73/autoload/vimball.vim

The "Align" plugin, that I had been failing to install (from a vimball) I have now also installed (via the so % command on the vimball, as per normal.

于 2013-06-25T14:05:51.747 回答
3

确保您的路径中有一个 .vimrc 以供 VIM 打开,至少具有以下内容(如在此处找到:http: //www.mail-archive.com/vim@vim.org/msg12581.html)。这为我解决了。

" =====================================================================
"  Initialize: {{{1
set nocp
if version >= 600
  filetype plugin indent on
endif 
于 2013-04-05T17:50:41.133 回答
1

未找到用户定义的命令

这解释了错误;Vimball 插件未安装(尽管您在文件系统中的某处找到它)或已明确关闭(在:let g:loaded_vimballPlugin = 1某处)。原因取决于你的环境,如何/谁安装了 Vim。该:scriptnames命令向您显示什么是活动的,并且 :set runtimepath? 显示目录。或者只是务实地从 vim.org 下载 Vimball 插件并重新安装?!

于 2012-11-06T15:17:56.033 回答