Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I recently installed MacVim along with Janus. When I'm inside macVim I can change my color scheme with :color freya but if i restart MacVim the them is reverted back to ir_black. I've added freya to my .vimrc.local, but it doesn't help.

Also added the following: set term=xterm-256color

I'm using Lion and I've got a bunch of themes in ~/.vim/colors

share|improve this question

migrated from stackoverflow.com Oct 25 '11 at 15:29

This question came from our site for professional and enthusiast programmers.

3 Answers 3

Are you sourcing your .vimrc.local by hand? That is not a standard file. MacVIM will read your ~/.vimrc and ~/.gvimrc. I'd suggest you keep your syntax settings in .gvimrc for MacVIM unless you want to use them in your terminal as well.

If you want to keep a generic .gvimrc that is shared by multiple systems and set your color only for this machine in .gvimrc.local you can put the following at the end of your ~/.gvimrc

" Allow for local machine-specific modifications
if filereadable($HOME . "/.gvimrc.local")
  source ~/.gvimrc.local
endif 
share|improve this answer
    
Sigh. The *.local is due to Janus. The typical Janus installation takes over a user’s .vimrc, .gvimrc, .vim/, and then expects users to put their customizations in *.local variant files. Ick. –  Chris Johnsen Oct 26 '11 at 5:45

GUI-based instances of Vim source .vimrc and then .gvimrc, so anything in the latter can potentially override anything in the former.

The Janus .vimrc does a color desert and its .gvimrc does a color ir_black.

Since .vimrc.local is sourced by Janus’s .vimrc as a final step, its settings can be (in this case, are being) overridden by Janus’s .gvimrc.

To override the color ir_black from Janus’s .gvimrc, you need to put your color freya in your .gvimrc.local (which Janus’s .gvimrc sources as a final step—if it exists and is readable).

share|improve this answer
    
I also had this problem - thanks for the clear explanation. –  Sebastian Motraghi Dec 23 '11 at 2:20

MacVim is a graphical version of Vim, so it can have a graphical config file (.gvimrc) as well as the regular .vimrc.

Have you tried putting your color setting in .gvimrc, or seen whether it has a conflicting setting?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.