如何在Vim中设置默认字体大小? [英] How do I set the default font size in Vim?
问题描述
我正在尝试使用Vim为我的GUI配置默认设置.我已经在网络上进行了研究,但是我找到并尝试过的所有解决方案都行不通.
I am trying to configure the default settings for my GUI with Vim. I already made research on the web, but all the solutions I found and tried did not work.
以下是我尝试过的一些操作(在.vimrc文件中):
Here are some of the things I tried (in the .vimrc file):
set guifont = Monaco:h20
set guifont=Monospace 20
实际上我不在乎Monaco字体.
Actually I don't care about the Monaco font.
推荐答案
对于第一个,请删除空格.空格对于set命令很重要.
For the first one remove the spaces. Whitespace matters for the set command.
set guifont=Monaco:h20
第二个应该是(h表示高度)
For the second one it should be (the h specifies the height)
set guifont=Monospace:h20
我建议设置字体(如果您的版本支持)
My recommendation for setting the font is to do (if your version supports it)
set guifont=*
这将弹出一个菜单,允许您选择字体.选择字体后,输入
This will pop up a menu that allows you to select the font. After selecting the font, type
set guifont?
显示当前guifont设置为什么.之后,将该行复制到您的vimrc或gvimrc中.如果字体中有空格,请添加\
以转义空格.
To show what the current guifont is set to. After that copy that line into your vimrc or gvimrc. If there are spaces in the font add a \
to escape the space.
set guifont=Monospace\ 20
这篇关于如何在Vim中设置默认字体大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!