我在Windows7上使用的是Consolas7.2。我可以从菜单中将gVim字体设置为Consolas10(字号)。我尝试在.vimrc
文件中设置它,如下所示:
set guifont=Consolas\ 10
但它不起作用。有人知道怎么设置这个吗?
发布于 2010-07-23 16:28:13
我使用以下大小(在Windows上使用Consolas大小11,在Mac OS X上使用Menlo常规大小14,在其他任何地方使用Inconsolata大小12 ):
if has("gui_running")
if has("gui_gtk2")
set guifont=Inconsolata\ 12
elseif has("gui_macvim")
set guifont=Menlo\ Regular:h14
elseif has("gui_win32")
set guifont=Consolas:h11:cANSI
endif
endif
编辑:在此期间,您可以查看Coding Horror的Programming Fonts blog post。
编辑²:添加了MacVim。
发布于 2010-07-23 16:02:06
尝试从菜单中设置字体,然后键入
:set guifont?
这应该会向您显示Vim已将此选项设置为的字符串。您需要转义任何空格。
发布于 2020-03-27 16:42:42
我最终不得不做
:set guifont=Courier:h10:cANSI
https://stackoverflow.com/questions/3316244
复制相似问题