开发者

How to set path for vim config files?

I know they say to store your vim config files under source control.

Is there a way to tell vim where the config files are? like .vimrc etc.?

i.e. I will 开发者_如何学运维store them in a different folder where my other git repos are.

BTW, what are good coloring plugins for ruby?


You can use the VIM environment variable to change the location of your ~/.vim/ directory, if you want to keep all your git repos in one place. See the :help $VIM section for more details, but here's the bit that looks most useful:

The environment variable "$VIM" is used to locate various user files for Vim,
such as the user startup script ".vimrc".  This depends on the system, see
|startup|.

If you add export VIM=/home/blankman/git/vim/ to your ~/.bashrc, you ought to be set.


Excerpt from the vim man page:

-u {vimrc}  Use  the  commands in the file {vimrc} for initializations.
               All the other initializations are  skipped.

To have it work whenever you run vim, try putting in your shell's startup script (.bashrc etc):

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

Link: http://www.h3rald.com/articles/herald-vim-color-scheme/

Has a few schemes with ruby highlighting examples. Vim has decent native ruby support it seems, so you may just want a new colour scheme.

A light-coloured Ruby highlighting scheme here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜