Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
974 views
in Technique[技术] by (71.8m points)

git - Where is vimrc or vim profile for github's mingw32 shell on a Windows machine?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...