edenzik / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

does not source .gvimrc on startup #138

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have some color settings in my $HOME/.gvimrc which are not loaded on
startup by macvim. Does it read a different file (like ~/.mvimrc?)

Original issue reported on code.google.com by dcro...@gmail.com on 25 Nov 2008 at 3:32

GoogleCodeExporter commented 9 years ago
It reads .gvimrc and .vimrc like any other gvim port. 

The problem is most likely your .gvimrc file itself -- usually these kind of 
problems happen because the line "set 
nocp" occurs after the "colorscheme ..." line.  If that's not the problem, try 
commenting out all lines in your 
.gvimrc (except the "colorscheme ..." line) and add them back one at a time to 
figure out what the problem is.

Original comment by bjorn.winckler@gmail.com on 25 Nov 2008 at 3:45

GoogleCodeExporter commented 9 years ago
Sorry I should have included more information in the original bug.

+ my .vimrc has "color desert" (and lots of other stuff)
+ my .gvimrc has "hi Normal guifg=White guibg=black"

when MacVim loads, this line doesn't seem to have taken effect. does macvim have
additional/other color settings that it reads or loads that I need to disable?

Original comment by dcro...@gmail.com on 25 Nov 2008 at 3:52

GoogleCodeExporter commented 9 years ago
I just tried with

.vimrc:
colorscheme desert

.gvimrc:
hi Normal guifg=White guibg=Black

and it works without any problems.  There must be something else in your .vimrc 
or .gvimrc that is 
interfering, so you'll simply have to try to figure out what it is.  Did you 
check for "set nocp"?

Original comment by bjorn.winckler@gmail.com on 25 Nov 2008 at 3:56

GoogleCodeExporter commented 9 years ago
No, don't have that in any of my rcs.

Stranger still, when I start MacVim from the terminal, either with the mvim 
wrapper
script or with /Applications/MacVim/Contents/MacOS/MacVim, it has what I expect 
to be
the "correct" settings loaded. So this indicates it may have something to do 
with the
environment that vim is started with? My .MacOSX/environment.plist has HOME 
defined,
anything else I should put in there?

Original comment by dcro...@gmail.com on 25 Nov 2008 at 7:34

GoogleCodeExporter commented 9 years ago
Ah ha! The culprit at last.

the `mvim` script starts macvim with -g (which causes it to source .gvimrc), 
whereas
quicksilver (my launcher of choice) does not. Now just to figure out how to 
make it
do so...

please close this bug, and thanks very much for your help.

Original comment by dcro...@gmail.com on 25 Nov 2008 at 7:47

GoogleCodeExporter commented 9 years ago
I'm not sure exactly what Quicksilver does, but...

_never_ call /Applications/MacVim.app/Contents/MacOS/MacVim directly.  From 
Terminal, either start 
MacVim by

1.  open /Applications/MacVim.app

or

2. /Applications/MacVim.app/Contents/MacOS/Vim -g

That is, don't call the MacVim binary - only the Vim binary!

Original comment by bjorn.winckler@gmail.com on 25 Nov 2008 at 7:55