I'm on Windows XP and I just installed GVim 7.3. How do I make the default editor? How can I make it run using the command prompt e.g.
c:\Windows>gvim boot.ini
open this file in gvim.
Thanks a lot
To be able to call Gvim from the command line, you have to add the installation directory of Vim to your PATH
variable. To do that, right click on My Computer on the desktop (or in Explorer) → Properties → Advanced Tab → Click on Button Environment Variables.
In the Dialog, go to the User Variables field and search if there is already a PATH
variable. If there is a PATH
Variable, select it, click Edit and change it as follows:
%PATH%;C:/Program Files/Vim/Vim73
(or whatever the installation directory of Gvim is).
If there is no PATH
variable set, create a new one with the content written above.
Confirm everything with OK, then open a new command window (important!), navigate to the desired directory and type
gvim somefile.txt
This should bring up your favourite editor.
Adding Gvim to your PATH
doesn't make Gvim the default editor for a certain file type. This can be achieved the following way:
If you install Gvim, be sure to check the Add to context menu option. If you did that, you can right click on any file in the Windows Explorer and select Edit with Vim.
Right click the any file you want to open -> select Open or Open With ->check always open with the following editor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With