Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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"
However, when I invoke gVim, it does not use that font. The "set guifont" command should also return "Luxi Mono 9," but it comes back blank.
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.
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
Originally posted by windhair 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?
I have my guifont variable defined in ~/.vimrc, not in ~/.gvimrc. It should not matter, but it may be worth trying...
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
And in the .vimrcfor I just add a line "set guifont=6x12".
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....
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:
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.