首页 技术 正文
技术 2022年11月18日
0 收藏 713 点赞 3,674 浏览 1194 个字

Question:

I can’t believe I am typing a question for a simple thing like this but here we are. I can’t for the life of me figure out what the exact name for the settings file is for vim on Windows (.vimrc does not work on Windows). And if I have names
right (read the next para) then I don’t know why it is not picking up the settings from it.

I tried creating _vimrc and _gvimrc in the root directory where I copied the file from the example settings file that came installed with vim. I set the following command on top of the example commands:

set nobackup
set nowritebackup
set guifont=Courier_New:h11:cANSI

It is not accepting this file (whether it is named _vimrc or
_gvimrc
, I tried both) as the settings file as the font has not changed on the next start-up and still writes backup files.

Answer:

my _vimrc/_gvimrc is stored at C:/Users/<ME>/_vimrc and is working fine.

It’s generally a good idea to keep personal settings separate from installation files.

To get more information about the search paths for your configuration files, type
:he vimrc-intro.

And be careful: the docs say

For MS-DOS and MS-Windows you can use one of these:

$HOME/_vimrc

$VIM/_vimrc

While this is absolutely true, it could be a bit surprising that $VIM does not expand to e.g.
C:/Program Files/vim/<your_version> (this is what $VIMRUNTIME holds) but only to
C:/Program Files/vim/.

This said, C:/Program Files/vim/_vimrc should be read during startup.

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,028
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,518
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,365
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,146
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,780
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,858