I'm trying to consolidate all my vim related files/plugins into ~/.vim
folder so that I can dump it on github and get started with pathogen. However, right 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 shows up as well since I have syntax on
in my .vimrc
.
So for trial, 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 start vim it complains that it can't open file /usr/share/vim/vim73/syntax/syntax.vim
(because I renamed that folder). I expected vim to automatically now pickup the syntax folder residing in my ~/.vim
.
My runtime path is:
~/.vim, /usr/share/vim/vimfiles, /usr/share/vim/vim73, /usr/share/vim/vimfiles/after, ~/.vim/after, /usr/share/vim/vim73
How would I do this?
Give this a look:
http://vimcasts.org/episodes/synchronizing-plugins-with-git-submodules-and-pathogen/
This is what I use and I've not had trouble with any plugins.
Some special vim scripts (I know only one: syntax/syntax.vim
) are looked up only in $VIMRUNTIME
directory (that is by default /usr/share/vim/vim{major_ver_num}{minor_ver_num}
), not in the whole &runtimepath
. So you can't do this without setting VIMRUNTIME before running syntax on
. It does not matter though whether you will set it in something like ~/.zprofile
, use an alias vim='VIMRUNTIME=~/.vim vim'
or just do let $VIMRUNTIME=$HOME.'/.vim'
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With