Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

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

shell - How do you run Vim in Windows?

I just installed gVim, and tried using the usual "vim myfile.java" technique that usually works for linux to open up a file and edit it. But unfortunately, this doesn't seem to work. I've also tried "gvim myfile.java", but that doesn't work either.

Does anyone know how to open up vim (and use it like you do in linux) using Windows Powershell, or some other technique?

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

When you install gVim:
Please make sure [?] Create .bat files for command line use is checked.
It'll create several .bat files in C:Windows:

C:>cd %windir%
C:WINDOWS>dir /b *.bat
evim.bat
gview.bat
gvim.bat
gvimdiff.bat
view.bat
vim.bat
vimdiff.bat
vimtutor.bat

Notice that: C:WINDOWS is already in the PATH environment variable.
When you type vim in command line, C:WINDOWSvim.bat will be launched.
If you leave the checkbox mentioned above unchecked, you need to modify PATH manually.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...