3

I have customized a color profile for Vim (toto.vim) in the colors folder at : /usr/share/vim/vim74/colors

Now, to use it, I am obliged to call it each time I start vim, using the command :

:colorscheme toto

Is there any way to load it by default instead of the default color scheme?

1

1 Answer 1

6

You can use a .vimrc file in your $HOME to load commands whenever you start vim.

vim $HOME/.vimrc

Just put your command as one line; commands in the .vimrc are used in ex-mode, so you don't need to put the colon at the beginning (so use colorscheme toto rather than :colorscheme toto).

You can find plenty of example .vimrcs online with lots of neat tricks in them, too.

3
  • That is what I have done. I appended colorscheme toto in the /usr/share/vim/vimrc and now it's working fine. Thanks. I am validating your answer in few seconds!
    – Hanynowsky
    Commented Dec 19, 2013 at 17:03
  • 1
    Appending it to /usr/share/vim/vimrc will force it on every other user of vim on your computer and might get you into trouble if /usr/share/vim/vimrc is controlled by your package manager. $HOME/.vimrc does not have these issues.
    – Wieland
    Commented Dec 19, 2013 at 18:03
  • Yeah thanks. The purpose was to force the same layout for all users!
    – Hanynowsky
    Commented Dec 22, 2013 at 12:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .