简体   繁体   English

gvim读取_vimrc,vim不读取

[英]gvim reads _vimrc, vim does not

I'm running vim from an external hard drive, so _vimrc is not in %HOMEPATH% the way it normally is. 我正在从外部硬盘驱动器运行vim,因此_vimrc不在%HOMEPATH%中,通常不是如此。

_vimrc is inside the vim folder, in addition to the vim73 and vimfiles folders. _vimrc除了vim73和vimfiles文件夹之外,还位于vim文件夹中。

_vimrc works when I run gvim, but not when I run vim. _vimrc在我运行gvim时起作用,但在我运行vim时不起作用。

Why? 为什么?

If you are using MSYS or Cygwin, these programs will cause vim to look for your _vimrc in their own home directories, not the typical Windows home directory. 如果您使用的是MSYS或Cygwin,这些程序将使vim在自己的主目录(而不是典型的Windows主目录)中查找_vimrc。

If this is the case, you can probably fix it by making a link to your _vimrc and placing it in their special home directory. 如果是这种情况,您可以通过建立指向_vimrc的链接并将其放置在其特殊主目录中的方式进行修复。

Seems you are using vim on Windows, if you are using vim binary release with GVIM, it should work without problem, just confirm it by checking your path command "path", and make sure you had installed vim with command line script, it's a option during installation. 似乎您在Windows上使用vim,如果您将vim二进制发行版与GVIM一起使用,它应该可以正常工作,只需通过检查path命令“ path”进行确认,并确保已使用命令行脚本安装了vim,这是一个安装期间选择。

If you are using MSYS or Cygwin, just type "type vim" to see which vim binary you are using, and check your home by 'cd ~', it should use the rc file under ~ unless you had some customization with previous binary/shell script. 如果您使用的是MSYS或Cygwin,只需键入“ type vim”以查看正在使用的vim二进制文件,然后通过“ cd〜”检查您的家,它应该使用〜下的rc文件,除非您对以前的二进制文件/外壳脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM