You are not logged in.

#1 2012-05-05 12:51:55

asd01
Member
Registered: 2010-12-19
Posts: 19

[SOLVED] Change location of ~/.vimrc and ~/.vim

Title says it all really. I'm able to change location of ~/vimrc like so:

vim -u /path/to/vimrc

But I was wondering if there is a better way. As for location of ~/.vim folder I can't figure it out. I tried adding to /etc/vimrc

set runtimepath=/path/to/vim,$VIMRUNTIME

But plugins are not loaded from /path/to/vim and when I check runtimepath in vim:

:echo $VIMRUNTIME
/usr/share/vim/vim73

Help with this little issue will be really appreciated.

Last edited by asd01 (2012-05-08 17:36:39)

Offline

#2 2012-05-05 14:12:44

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: [SOLVED] Change location of ~/.vimrc and ~/.vim

Not 100% what you're looking for, but you could also consider simply making an alias in your ~/.bashrc

alias vim='vim -u /path/to/vimrc'

Burninate!

Offline

#3 2012-05-05 14:15:34

aurinkolasit
Member
Registered: 2009-07-02
Posts: 27

Re: [SOLVED] Change location of ~/.vimrc and ~/.vim

At least this works for me when I want to append an additional folder in my 'runtimepath':

let &runtimepath.=',$PATH_TO_YOUR_CUSTOM_VIM_FOLDER'

The path needs to be absolute; use the :exe command and expand('$MY_VAR') function to avoid hardcoding if that's an issue for you.

Offline

#4 2012-05-08 17:36:17

asd01
Member
Registered: 2010-12-19
Posts: 19

Re: [SOLVED] Change location of ~/.vimrc and ~/.vim

aurinkolasit wrote:

At least this works for me when I want to append an additional folder in my 'runtimepath':

let &runtimepath.=',$PATH_TO_YOUR_CUSTOM_VIM_FOLDER'

The path needs to be absolute; use the :exe command and expand('$MY_VAR') function to avoid hardcoding if that's an issue for you.

Thanks, that is what I was after.

Offline

Board footer

Powered by FluxBB