永久修改 Vim 字体大小 [英] Permamently amend Vim font size

查看:26
本文介绍了永久修改 Vim 字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

警告:第一次使用 Vim 用户"

Warning: first-time Vim "user"

我想让 GUI 字体更大.

I'd like to make the GUI font much bigger.

它安装在现代 Windows 32 位机器上.

It is installed on a modern windows 32-bit machine.

我使用了 Edit 菜单并使用 Select Font...

I've used the Edit menu and found a good font using Select Font...

然后我输入了命令:

设置gfn?

返回...

guifont=Consolas:h16:cANSI

现在显然我需要在我的 vimrc 文件中添加一些东西.我想我在这里找到了文件?:

Now apparently I need to add something to my vimrc file. I think I have found the file here?:

那么为什么我现在正在努力进行更改?
无论我尝试用哪种方式(记事本或通过 Vim>Open)打开这个文件,它似乎都是只读的.
我假设一旦打开,我需要在文件中的某个点(?)添加如下内容?

So why am I now struggling to make the changes?
Whichever way I try (notepad or via Vim>Open) to open this file it seems to be read-only.
I assume once open I need to add something like the following at some point(?) in the file?

if has('gui_running')
  set guifont=Consolas:h16:cANSI
endif 

推荐答案

因为您的 _vimrc 位于 Program Files 下,Windows 正试图保护您免受潜在的系统损坏(并防止潜在的恶意程序这样做).

Because your _vimrc lives under Program Files, Windows is trying to protect you from potentially damaging the system (and is preventing potentially malicious programs from doing the same).

为了编辑您的 _vimrc,您需要以管理员身份运行 Vim.右键单击 gVim 图标并从菜单中选择以管理员身份运行.然后您应该能够编辑该文件.

In order to edit your _vimrc, you need to be running Vim as administrator. Right-click the gVim icon and select Run as administrator from the menu. You should then be able to edit the file.

随着时间的推移,您可能希望对该文件进行许多其他更改;您必须记住始终以管理员身份对其进行编辑.

You'll probably want to make lots of other changes to this file over time; you'll have to remember always to edit it as administrator.

这篇关于永久修改 Vim 字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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