On 13/05/11 10:26 AM, cyboman wrote:
i would like to move my .vimrc and .viminfo files in .vim directory.
the reason for it is so that i could keep my .vim directory under svn.
does anybody know how to tell vim to search for .viminfo and .vimrc in
different directories?
For vimrc, I recommend just putting something like
:source $HOME/.vim/vimrc.vim
in your ~/.vimrc file. I used a .vim extension so that you get syntax highlighting
when you open it. Actually, I have this in my ~/.vimrc:
if has('win32')
so $HOME/vimfiles/vimrc.vim
else
so $HOME/.vim/vimrc.vim
endif
At any rate, you put something simple in there that doesn't really ever change, so
doesn't need to be version controlled.
For .viminfo, see :h 'viminfo' and note that one of the options is the filename.
You should be able to specify a path using that, e.g.
:set viminfo+=n$HOME/.vim/.viminfo
However, I don't see why you would ever want to put .viminfo under version
control, and would recommend against it. You probably don't ever want to edit it
manually either (which is why I kept the . in it above).
Cheers,
Ben.
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php