3

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?

sakibmoon
  • 1,961
  • 3
  • 20
  • 32

3 Answers3

10

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
Community
  • 1
  • 1
pandubear
  • 1,525
  • 1
  • 11
  • 21
1

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 ;.

cforbish
  • 7,977
  • 2
  • 27
  • 31
  • 1
    Thanks. That works. But are there any other way, like giving the path with the command itself. It's not possible to set environment variables for all the programs. Another thing is why `firefox` start directly? It's not in my path. I checked. – sakibmoon Jul 14 '13 at 03:45
  • 1
    From the command prompt you can type in the full path either with or without using `start`. – cforbish Jul 14 '13 at 09:10
0

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

Mario Kutlev
  • 4,459
  • 6
  • 42
  • 60
pandubear
  • 1,525
  • 1
  • 11
  • 21