Merge vim files into ~ / .vim folder

I am trying to merge all my vim related files / plugins into a ~/.vim folder so that I can dump it on github and start with a pathogen. However, now all my vim plugins are scattered all over the place.

As an example, the syntax plugin is in /usr/share/vim/vim73/syntax/syntax.vim , and when I run :scriptnames , this also shows up since I have syntax on in my .vimrc .

So, for the trial version, I moved /usr/share/vim/vim73/syntax to /usr/share/vim/vim73/syntax1 and copied /usr/share/vim/vim73/syntax to ~/.vim .

however, now when I run vim, it complains that it cannot open the file /usr/share/vim/vim73/syntax/syntax.vim (because I renamed this folder). I expected vim to automatically launch the syntax folder located in my ~/.vim .

My execution path:

 ~/.vim, /usr/share/vim/vimfiles, /usr/share/vim/vim73, /usr/share/vim/vimfiles/after, ~/.vim/after, /usr/share/vim/vim73 

How can I do it?

+7
source share
2 answers

Look at this:

http://vimcasts.org/episodes/synchronizing-plugins-with-git-submodules-and-pathogen/

This is what I use, and I had no problems with any plugins.

+4
source

Some special vim scripts (I know only one: syntax/syntax.vim ) are viewed only in the $VIMRUNTIME (by default /usr/share/vim/vim{major_ver_num}{minor_ver_num} ), and not in general &runtimepath . Therefore, you cannot do this without installing VIMRUNTIME before running syntax on . It doesn't matter if you set it up somehow like ~/.zprofile , use the alias vim='VIMRUNTIME=~/.vim vim' or just do let $VIMRUNTIME=$HOME.'/.vim' .

+2
source

All Articles