Closed jmcantrell closed 13 years ago
Hi Jeremy,
Did you install the easytags plug-in using a direct git checkout of the repository on GitHub (possibly using Pathogen)? Because the git repository contains a submodule with miscellaneous auto-load scripts and unfortunately git doesn't clone submodules by default... You can use a command such as the following to clone the repository including the submodule:
git clone --recursive https://github.com/xolox/vim-easytags.git
Hope this helps!
PS. Since I switched to using submodules I haven't updated the installation instructions, I'll do that ASAP.
Ah. That was it. Thanks
@xolox: might be a good idea to catch this error and display a more friendly error (referring to the "recursive" part). I've been running into this myself, and it will happen with others, too.
@blueyed: Adding checks everywhere a xolox#misc#*
function is called doesn't sound very appealing :-) but I could add something like the following to the start of the plug-in to help users getting started:
try
call xolox#misc#os#is_win()
catch /^Vim\%((\a\+)\)\=:E117/
echoerr "It looks like the plug-in wasn't correctly installed, if you're using git you"
echoerr "should probably use \"git clone --recursive ...\" to clone the repository"
finish
endtry
Maybe I should add a more detailed explanation about this in INSTALL.md and have the error message refer to this file online. Of course that would require users to actually follow the link and read the installation instructions (not a lot of success with that so far :-)
@xolox: Would it be possible to have a autoload-fallback which would get used if the submodule is not initialized (and could echo the error)?
@blueyed: It's impossible to define an autoload function outside of the script with the corresponding filename (the prefix of the function name and the script name have to match). However I don't see the practical difference between my suggestion and yours... Is it that you're worried the explicit check will slow things down unnecessarily? Because in that case I would worry more about the execution of ctags --version
which takes an order of magnitude more time than checking whether an autoload function is callable.
I just committed 6ddd431b695e6a93227102cc097cf3f360071633 which might not be the most elegant way to detect the problem of the missing submodule but it's a start at least.
When updating the helptags via pathogen:
I get the following error:
This is on OS X 10.6.7 with MacVim