I know I can set fonts for gvim using something like set guifont=Menlo\ Regular:h14. I have the following questions
Is there a wiki where I can see what all fonts are supported?
I want to set my font to "Lucida Sans Typewriter". I tried set guifont=Lucida Sans Typewriter\ Regular:h14, but it gave me an error when I opened a file using gvim. Error is "E518: Unknown option: Sans"
I also tried to increase the font size using set guifont=Sans\ Regular:h14, but looks like it is stuck at font size 11. I am trying this on macvim.
You need to backslash all of the spaces in the font name, not just the last one.
You can :set guifont=* to open a font chooser with the fonts available on your system. Then after you pick one you like you can :set guifont? to read back the value you need to put in your .vimrc.
Related
I only case about the font size, I want nothing to do with the font other than its size set guifont makes me put in a font, therefor its useless to me.
Update: all of the answers here weren't what I was asking for but I gave up on trying to fix it and moved on to using vim on Cmder.
For nvim-qt used in Windows, the following command works after nvim-qt has started:
execute join(["GuiFont! ", split(GuiFont, ":")[0], ":h14"], "")
With your font size in place of 14.
To set the font size at start, you have to use ginit.vim instead of init.vim, since init.vim starts before the GUI is loaded. Location of ginit.vim is C:\Users[User]\AppData\Local\nvim.
I can't seem to change the font in Godot's script editor. I want to change it to the monaco_linux.ttf I downloaded. I've specified which file to use, but the font only seems to increase in size a bit when I set it.
How can I change the font in Godot's script editor?
Editor Font Setting:
Editor >> Editor Settings >> Code Font >> Path/To/ttf
It seems like the font wasn't working because I was trying to use size 14 font. When I switched to size 16, it worked fine..
I am new to fvwm machine which is used by my new employers.
I am struggling in customizing gvim menu (File, Edit,etc) font size.
As you can see in the attached image, the font size are decent, but menu size is pretty small as compared to text font size.
How to solve this??
Reference Image:
gvim uses gnome gtk in the gnome version of gvim and in this case you can configure your environment using a .gtkrc file see https://unix.stackexchange.com/questions/25043/what-is-this-gtkrc-file. As another answer pointed out for Gtk 2.x programs ~/.gtkrc-2.0 is the configuration file.
To modify your font see e.g.
https://ubuntuforums.org/showthread.php?t=846348
https://bbs.archlinux.org/viewtopic.php?id=164044
https://unix.stackexchange.com/a/478303/38701
examples:
gtk-font-name = "Sans 12"
which gives you a Sans-Serif font with size 12
gtk-font-name = "DejaVu Sans 11"
which is more specific regarding the font and uses size 11
Create .gtkrc-2.0 in your home directory if it isn't present already
and add:
gtk-font-name = "bitstream bold 16"
That should solve your problem.
OS: Mac OS X 10.10.3
MacVim: 7.4.712
I am trying to use MacVim to write LaTeX instead of Sublime Text.
So I set the font "Lucida Grande" from menu of MacVim but it looked strange:
This is what Lucida Grande looks like in Sublime Text:
Then I set "Helvetica" in MacVim and it looks like:
It seems that MacVim tries to display fonts in mono but this is not what I want. How could I set the font properly in MacVim just like what Sublime Text does?
While GVIM / MacVim can use proportional fonts (on certain platforms), there's no way around the screen-cell based addressing in Vim; it's a fundamental concept (taken from the terminal), and many features (like blockwise selections) depend on it.
So, you have to live with the fact that an i will take as much horizontal space as a W, and choose a corresponding (monospaced) font accordingly. This way, your editor will look much better :-)
I am trying to configure gvim font on linux in .vimrc but it produces strange results.
To make gvim use "Liberation Mono" I added set guifont=LiberationMono: h12. It gets applied but does not recognize :h12 option and output:
Error detected while processing /home/tastyminerals/.vimrc:
line 44:
E518: Unknown option: h12
But I am ok with the result since the font gets applied.
However when I correct the line to set guifont=LiberationMono:h12 gvim does not complain but the font gets changed to this:
This is not "Liberation Mono" of course, this thing happens with any other font I try to use.
Why does the font get changed to some strange monospaced variant? How can I configure the font correctly?
I managed to resolve the issue by correcting the font setting in ~/.vimrc
set guifont=LiberationMono\ 12