Setting font for gVim
Hi.
I'm having trouble setting the GUI font for gVim. I hope someone can help me out. I set the following in my ~/.vimrc file: Code:
set guifont="Luxi Mono 9" Strangely, if I specify the same font through the command-line parameter, such as gvim -font="Luxi Mono 9", then gVim uses the appropriate font. The "set guifont" command returns the correct font name ("Luxi Mono 9"), too. What am I doing wrong? Everything else I have in ~/.vimrc is working fine. I would appreciate any help. Dai |
I think you want to put the setting in the ~/.gvimrc which get executed when the GUI is started.
|
Quote:
Thanks for the response. I tried that too, but it did not work either. :confused: Anything else that you can think of? Thanks again, Dai |
Got it. Remove the quotes. The command should be:
set guifont=Luxi Mono 9 When I tried with the quotes, it was ignored. |
Quote:
You were right about the quotes being ignored. However, the above syntax with no quotes gave an error like this: Code:
Error detected while processing /home/dtoyama/.vimrc: Code:
set guifont=Luxi\ Mono\ 9 |
hi there,
i would like to link this tip to this thread. it is a really complete information about setting font for vim in gui mode. regards, slackie1000 |
Or, you can use xfontsel to get a compatible font description.
This is one description for Luxi Mono Code:
-*-luxi mono-medium-r-normal--17-120-*-100-*-0-microsoft-cp1252 |
Quote:
|
This doesnt work in my vim 6.1 kde.
:set guifont=6x12 works but it what I write in .gvimrc set guifont=6x12 seems have no effect. what should I do? |
Quote:
|
Thing not getting solved yet.
I thought I have a solution for the problem, but it doesnt. What I used in is Code:
autocmd BufEnter *.for source $HOME/.vimrcfor It works well. It seems that "set guifont" in .vimrc works only after the "source" or directly input with :set guifont=... after gvim startup, but no effect if I set it in .vimrc . And the other command in .vimrc work well, such as set hlsearch.... I dont'n know why? Can anyone give a hand? |
You can use /etc/vim/vimrc.local too. But firstly, I do not know why, but you
should to comment the logical structure in the /usr/share/vim/vimrc. Last three lines in it must be: Code:
"if filereadable('/etc/vim/vimrc.local') local rc file. |
It doesnt work.
BTW. I installed Latex vim Suite, but the guifont neither works for latex nor for other type files. |
It works when you run the command by your hands, right? The 'source!' command
(by default in vimrc it does not contains exclamation point, did you add it?) does exactly the same things, like you type them by yourself just after vim runs. Did you add the char ':' in the begining of your local script line? |
Quote:
Håkan |
All times are GMT -5. The time now is 09:30 PM. |