如何在vim上设置默认的字体大小? [英] How to set the default font size on vim?

查看:824
本文介绍了如何在vim上设置默认的字体大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用vim为我的gui配置默认设置。我已经在网上进行了研究,但是我发现和尝试的所有解决方案都无法正常工作。

以下是我尝试的一些内容(在.vimrc文件中) :

  set guifont = Monaco:h20 
set guifont =等宽20



其实我不在乎摩纳哥的字体。 div>

第一个删除空格。

  set guifont = Monaco:h20 

对于第二个应该是(h指定高度)

  set guifont = Monospace:h20 

设置字体的建议是你的版本支持它)

  set guifont = * 

这将弹出一个菜单,允许您选择字体。在此类型之后

  set guifont? 

显示当前guifont的设置。之后,将该行复制到您的vimrc或gvimrc中。如果字体中有空格,请添加 \ 来转义空格。

  set guifont = Monospace \ 20 


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 working.

Here is some of the things I tried (in the .vimrc file) :

set guifont = Monaco:h20
set guifont=Monospace 20

Actually I don't care about the Monaco font.

解决方案

For the first one remove the spaces. Whitespace matters for the set command.

set guifont=Monaco:h20

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 this type

set guifont?

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆