简体   繁体   中英

How to start Gvim from Command Prompt?

I tried to start gvim using start command like this

start gvim.exe

But it doesn't work for gvim , although it does work for firefox.exe . My questions are-

  1. How can I start gvim from command prompt?

  2. Why start command doesn't work for gvim.exe ?

  3. Are there any additional parameter that I can use when starting gvim from command prompt?

Completely different, so a separate answer:

Actually, -- I just remembered -- Vim isn't normally added to the path variable, it's run through .bat files in C:\\Windows.

From another answer on StackOverflow :

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 

This is because gvim.exe is not in your PATH list. If you know which directory gvim.exe resides, add this directory to your PATH list. This can be done by typing the following in an Explorer address bar:

Control Panel\System and Security\System

Then press Advanced system setings , then Environment Variables . The PATH is a list of directories separated by a ; .

Try typing just "gvim" instead of "start gvim.exe". That works for me. Vim isn't in my path environment variable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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