2
votes

I want to install this plugin, so first I extract the content of the zip and then I do:

$ vim camelcasemotion.vba

Then I do:

:so %

but I get this error:

Error detected while processing /tmp/camelcasemotion.vba: line 2: E492: Not an editor command: UseVimball Press ENTER or type command to continue

Here you have the page of the plugin. I have vim 7.3 and vimballPlugin installed as you can see here:

:/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
3
Are you sure that the plugin is also active? Try :verbose command UseVimball to verify. - Ingo Karkat
@IngoKarkat, i tried what you said and I get this "No user-defined commands found". - ziiweb
@tirengarfio Are you sure you don’t have set noloadplugins/set nolpl somewhere in the vimrc? Do you edit runtimepath here (search for something like set rtp/set runtimepath/&rtp/&runtimepath)? What does type vim in the shell show? Same for echo $VIMRUNTIME (in shell. In vim also makes sense to check). What do verbose autocmd SourceCmd and verbose autocmd SourcePre report in vim? - ZyX

3 Answers

3
votes

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.

3
votes

Be sure that you have a .vimrc in your path for VIM to open, with at least the following (as found here: http://www.mail-archive.com/[email protected]/msg12581.html). This solved it for me.

" =====================================================================
"  Initialize: {{{1
set nocp
if version >= 600
  filetype plugin indent on
endif 
1
votes

No user-defined commands found

That explains the error; the Vimball plugin isn't installed (though you found it somewhere in your file system) or has been explicitly turned off (there's a :let g:loaded_vimballPlugin = 1 somewhere). The reason depends on your environment, how / who installed Vim. The :scriptnames command shows you what is active, and :set runtimepath? shows the directories. Or maybe just pragmatically download the Vimball plugin from vim.org and install it again?!