I try to setup vim, which is quite difficult for me.

Personally I prefer to run programs via the cmd.

So I set the home path of my vim 7.4 via advance settings,

so that I can use the command gvim.exe in the cmd.

But I would prefer to use a shorter command to run the gvim.exe.

How can I make such a shortcut?

Instead of typing gvim.exe I would prefer typing vim or gvim.

best greetings


  • It's unclear from your question, but has your setup put the gvim directory in your PATH? If so you can just type gvim in a cmd shell (in the same way you can type notepad instead of notepad.exe. If its not in the PATH then add it.
    – DavidPostill
    Commented Jan 15, 2016 at 10:56

3 Answers 3


Firstly, you can rename it to whatever you want so you don't have to type out gvim.exe. You could call it v.exe if you really wanted, as long as nothing clashes with it. The .exe is entirely optional as well. So you could just call v file.txt.

Then you can place it on your machine somewhere and add it's path to the environmental variable PATH, meaning it can be run from anywhere on your machine (You can also place it somewhere that already is in PATH, but it's a lot neater to give it it's own location, say C:\Tools\GVIM\).

To add to the PATH variable: (guide here for general use, the interface is actually a lot nicer in Windows 10):

  1. Go to Control Panel -> System
  2. Click Advanced system settings
  3. Click the Environment Variables button.
  4. Under System Variables, select Path, then click Edit. (You can choose if you want it for just your User, the list at the top, or the whole machine, the list at the bottom)

enter image description here

  1. Click New and add your folder path (C:\Tools\GVIM\)
  2. Click OK to all screens, you can now use your command from any folder in CMD.
  • So if i rename the gvim.exe it will make no issues, right? Commented Jan 15, 2016 at 11:08
  • @TimSobkowiak Unless there are other programs/utilities reliant on it being named correctly, it should be fine. If it's not, just rename it back.
    – Jonno
    Commented Jan 15, 2016 at 11:10
  • for the env variables it is a lot easier just to go into search and type env it is usually the first option
    – WendyG
    Commented Jun 24, 2020 at 9:50

Just install cygwin from cygwin.org! It handles all your unix utilities as exe files and gvim is included. After installing, go to a cygwin shell and cd /cygdrive/c to get to the root of your C:\ drive.


You can add an alias to your Powershell profile as follows New-Alias -Name vim -Value 'C:\Program Files (x86)\Vim\vim90\vim.exe'

You are as already mentioned free to call the alias whatever you want. From here you can launch vim from Powershell.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .