You are not logged in.

#1 2005-07-29 22:40:50

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

gVim configuration files

I'm forcing myself to learn how to use Vim and all I want to do is to specify a default color scheme and font for when I run gVim.  I know the commands are :colorscheme foo and :guifont=foo respectively, but sticking the set colorscheme foo or set guifont=foo commands in the .vimrc file or the .gvimrc file doesn't seem to work.

I've gotten nowhere on the color scheme issue, but I have tracked down the font issue (somewhat) as it appears to need the full X-11 font listing in a similar form as what's listed by the command xlsfonts.  I want to use the "Terminus" font at size 12, but have been unable to get it working properly...usually the spacing gets all messed up and the font doesn't actually change.

So there you have it.  Any other advice/links/sample configs for a Vim newbie is much appreciated!

Offline

#2 2005-07-29 22:46:02

jackmetal
Member
From: US
Registered: 2005-06-13
Posts: 164

Re: gVim configuration files

You can put them in the .Xdefaults file...   Something like listed below, but you can change the colors to whatever you like:

Vim*useSchemes:all
!Vim*sgiMode:true
Vim*useEnhancedFSB:true
Vim.foreground:Black
Vim*background:white

Is that what you're looking for?


--

Some of the world's greatest feats were
accomplished by people not smart enough
to know they were impossible.
-- Doug Larson

Offline

#3 2005-07-29 22:47:57

jackmetal
Member
From: US
Registered: 2005-06-13
Posts: 164

Re: gVim configuration files

Oh, and a sample font line would be something like:

Vim*font:-misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-15-*5

Hope that helps get you started...  :-)


--

Some of the world's greatest feats were
accomplished by people not smart enough
to know they were impossible.
-- Doug Larson

Offline

#4 2005-07-30 01:45:11

SleepyDog
Member
Registered: 2004-10-15
Posts: 114

Re: gVim configuration files

#~/.vimrc

set guifont=Terminus 12
colorscheme inkpot

Works over here.

Offline

#5 2005-07-30 01:47:07

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: gVim configuration files

fullmetal: I'm not sure that's quite what I'm looking for.  Poking around the online documentation, it looks like the whole convoluted font listing isn't necessary any more:

For the GTK+ 2 GUI the font name looks like this:
        :set guifont=Andale Mono 11
    That's all.  XLFDs are no longer accepted.

I've also learned that only things I want to take place when using gVim (essentially $ vim -g) should be placed in .gvimrc while the rest of the settings that should be shared between the gui and the console version go into .vimrc

I'm not at home right now, and thus can't try out the different font setting, but I'll see if that doesn't work.  Still not sure on the colorscheme though...

Offline

#6 2005-07-30 01:51:06

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: gVim configuration files

SleepyDog: Thanks for trying it out...I had tried it as set guifont="Terminus" with quotes and no size listed afterward.  I was just copying the example from the default .vimrc, so I'll have to try that syntax (which seems to be supported by the quote I posted above as well).

Offline

Board footer

Powered by FluxBB