在Windows机器上github的mingw32 shell的vimrc或vim配置文件在哪里? [英] Where is vimrc or vim profile for github's mingw32 shell on a Windows machine?

查看:515
本文介绍了在Windows机器上github的mingw32 shell的vimrc或vim配置文件在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Cygwin有一个主目录,我可以存储一个.vimrc文件来设置语法高亮。我知道在linux机器上这个文件通常在一个主目录,它可以全局存储(虽然我还没有弄清楚全局的工作原理)。



我是windows用户(我道歉),所以我使用不同的shell不同的东西,并不是所有太确定为什么语法高亮是不工作,当我启动从git bash shell。它适用于cygwin和腻子。但不是那么多的git的mingw32。另一件事是,当我使用cygwin到远程服务器时,我不能使用Vim,但是当我使用Putty的shell连接时,我可以使用Vim。



对此主题的任何帮助将非常感谢。

解决方案

Git bash使用MSYSGIT,它带有自己的Vim。一种查看方式 -



在您的git bash类型中

  $ type vim 

它会告诉你使用哪个vim可执行文件。在我的机器上,如果您输入

$ b $,它指向



/ bin / vim



b

vim --version ,它产生了很多环境。



它到一个grep,像这样



vim --version | grep vimrc ,这将告诉你这个vim实例将寻找vimrc的位置。


Cygwin has a home directory where I can store a .vimrc file to set up syntax highlighting. I know on linux machines this file is usually in a home directory and that it can be stored globally (although I haven't figure out how the global thing works yet).

I'm windows user (I apologize), so I use different shells for different things, and am not all too sure why syntax highlighting is not working when I launch it from the git bash shell. It works fine for cygwin and for putty. but not so much for git's mingw32.

Another thing is that when I ssh to a remote server using cygwin, I cannot use Vim, but I can use Vim just fine when I connect using Putty's shell.

Any help on this topic would be greatly appreciated.

解决方案

Git bash uses MSYSGIT, which comes with its own Vim . One way to look it up -

In your git bash type

$ type vim

it will tell you which vim executable is used. In my machine it points to

/bin/vim

if you type

vim --version, it spits out a lot of environment.

pipe it to a grep, like this

vim --version | grep vimrc and this will tell you the location(s) where this instance of vim will look for vimrc.

这篇关于在Windows机器上github的mingw32 shell的vimrc或vim配置文件在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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