macvim 改变字体大小?

发布于 2024-09-02 16:27:27 字数 190 浏览 3 评论 0原文

我正在使用 macvim,我喜欢它。我也很喜欢默认字体。

我的问题是:

如何更改 .gvimrc 中的字体大小?我希望它更大,而不改变默认字体。

我见过的所有示例都指定了字体,然后是“:”,然后是大小。

那么我该如何更改大小而不是字体本身呢?

谢谢!

I'm using macvim and I love it. I also happen to really like the default font.

My question is:

How do I change the font size in my .gvimrc? I want it to be bigger, without changing the font from the default.

All the examples I've seen specify a font then a ':' then the size.

So how do I just change the size not the font itself?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

意中人 2024-09-09 16:27:32

更改 vim 控制台 字体大小可以增大或减小

set guifont=Menlo\ Regular:h14

对于 Macvim,以下快捷键

zoom out - CMD+-
zoom in -CMD+=

适用于 终端

Zoom in-CMD/ctrl++
Zoom out-CMD/ctrl+-
Normal default size - CMD/cmd+0    

Changing the size in vim console font size can increase or decrease

set guifont=Menlo\ Regular:h14

For Macvim following key shortcut work

zoom out - CMD+-
zoom in -CMD+=

For Terminal

Zoom in-CMD/ctrl++
Zoom out-CMD/ctrl+-
Normal default size - CMD/cmd+0    
赴月观长安 2024-09-09 16:27:31

-=-- 将分别增大和减小字体大小。

-= and -- will increase and decrease the font size, respectively.

你穿错了嫁妆 2024-09-09 16:27:31

这对我来说效果很好。

:set guifont=Menlo\ 常规:h12

This works great my end.

:set guifont=Menlo\ Regular:h12

如梦初醒的夏天 2024-09-09 16:27:31

响应中缺少一个有用的注释 - 您可以使用 set guifont=* 这将打开一个字体选择器,供您从系统上的可用字体中进行选择。它可能仅限于 OSX 和 Linux,但比手动输入更好。

选择字体后,您可以再次使用set guifont,它将打印出字体的名称和您选择的大小。唯一需要注意的是 ~/.vimrc 中的任何空格都需要反斜杠

One useful note is missing from the responses - you can use set guifont=* which will bring up a font-picker for you to select from the available fonts on the system. It might be OSX and Linux only, but preferable to having to enter it manually.

Once you've selected the font, you can use set guifont again which will print out the name of the font and the size you've selected. The only caveat being that any spaces need to be backslashed in your ~/.vimrc

趴在窗边数星星i 2024-09-09 16:27:30

如果您不介意弹出菜单,设置字体的快速方法是输入 :set gfn=*

这将允许您调整字体的任何属性,而无需更改任何其他内容。

然后你可以使用 :set gfn 查看它现在的设置并将其添加到你的 .vimrc 中。

举个例子,在我的例子中,它显示 guifont=Monaco:h12 ,因此为了在启动时获得相同的设置,我将 set gfn=Monaco:h12 添加到我的.vimrc。

A quick way to set the font if you don't mind a menu popping up is to type :set gfn=*.

This will allow you to adjust any property of the font without changing anything else about it.

Then you can use :set gfn to see what it is now set to and add that to your .vimrc.

As an example, in my case it shows guifont=Monaco:h12 and so in order to get the same setting on startup, I added set gfn=Monaco:h12 to my .vimrc.

吃颗糖壮壮胆 2024-09-09 16:27:30

以上答案都不适合我,以下是解决方案:

添加到您的 .gvimrc,对于 janus 用户,其 ~/.gvimrc.after :

set guifont=Menlo\ Regular:h14

None of the above answers worked for me, here is what worked out:

Add to your .gvimrc, for the janus users its ~/.gvimrc.after :

set guifont=Menlo\ Regular:h14
孤城病女 2024-09-09 16:27:29

默认字体为 Bitstream Vera< /a>(在该页面上搜索“默认字体”)。那么为什么不直接指定它,而是使用不同的字体大小呢?例如,

:set guifont=Bitstream\ Vera\ Sans\ Mono:h14

这种方法还可以确保,如果将来默认值发生更改(例如,更改为系统默认值Monaco),您仍然可以启用自己喜欢的字体。

The default font is Bitstream Vera (search for 'default font' on that page). So why not just specify that, but with a different font size? E.g.

:set guifont=Bitstream\ Vera\ Sans\ Mono:h14

This approach also ensures that if in future the default changes (e.g. to the system default, Monaco), you will still have your preferred font enabled.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文