Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to install Go Vim plugins aswell as gocode. https://github.com/nsf/gocode

The installation finished with no errors, all my scripts are now inside ~/.vim For reference, this is my .vimrc: http://pastebin.com/HLfgyTX7

But for some reason they won't get loaded... I checked with :scriptnames. Instead, scripts like ruby.vim from /usr/share/vim/vim73/syntax get installed...but that "syntax" folder has several dozen .vim files in it, why did ruby.vim get installed? Anyway....

Almost nothing gets installed from ~/.vim. In fact, only the gofiletype.vim shows up in :scriptnames.(in addition to everything installed with the vundle.vim.)

:echo $VIMRUNTIME shows /usr/share/vim/vim73 (why is this not ~/.vim ?? Is that bad? Why does it still load some plugins from ~/.vim if it's not the runtime directory...)

These folders exist in my ~/.vim: autoload bundle ftdetect ftplugin indent syntax

I feel like I'm missing some basic detail about how to install stuff, the docs just say to put everything into "/plugin", but that's not what

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Scripts like ruby.vim get sourced because Vim has detected that it's editing a file whose filetype is ruby. The filetype is usually determined from the file name according to rules in $VIMRUNTIME/filetype.vim, although the file contents may also be used to determine the filetype.

The files in the ftplugin, syntax and indent directories are loading according to the filetype of the current buffer and according to whether or not the loading of that kind of plugin has been enabled by the :filetype command. The files in the plugin directory are all loaded when Vim starts, regardless of the type of file being edited.

When Vim loads plugins, it searches all the directories in 'runtimepath'. $VIMRUNTIME is just one of those directories, as is ~/.vim.

The directories under your ~/.vim directory look correct except that plugin is missing and bundle is not standard--it's not one that Vim would look in automatically.

Vim does not look for any plugin files directly in the ~/.vim directory. All plugin files go into a subdirectory of ~/.vim. So if you've put any of your plugins directly under ~/.vim, they won't been seen. They should probably go under ~/.vim/plugin instead.

You can read more about these issues here:

:help 05.4
:help runtimepath
:help startup
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.