On 13/02/09 21:44, Peter Salzman wrote:
> I only use Windows at work, so I'm a bit newbie-ish here.
>
> I installed Vim for Windows on Windows XP.  I'd like to open a text
> file with GVim, not Vim.
>
> * I double click an icon.  It opens up in Vim.
>
> * I right click an icon and choose "Edit with Vim".  I opens in GVim.
>
> * I right click an icon and choose "Open With" and select "Vim".  It
> opens in Vim.
>
> * I right click an icon and choose "Open With | Choose Program...".
> Then I click on Vim.   It opens up in Vim.
>
> * I right click an icon and choose "Open With | Choose Program...".
> Then I click on Browse and select "D:\Program
> Files\vim\vim72\gvim.exe".  Windows doesn't seem to like this because
> it throws me back into the "Open With" window as if gvim.exe wasn't a
> proper executable.
>
> * From the Windows explorer, I choose "Tools | File Types | Txt |
> Advanced".  I choose "Open | Edit".   I see this in the "Application
> used to perform action":
>
> "D:\Program Files\vim\vim72\gvim.exe" "%1"
>
> which looks ok to me.
>
> How do I coax Windows to use GVim, not Vim?
>
> Thanks!

Method I
--------
Create (or modify) your own desktop icon with "Gvim" as the name and 
"D:\Program Files\vim\vim72\gvim.exe" "%1" as the command. The icon will 
probably be OK but if (after setting the Command) it isn't, you can get 
the right one from the gvim.exe binary.

Method II
---------
1. Make sure that "D:\Program Files\vim\vim72" (without the quotes) is 
part of your PATH, which IIRC is a semicolon-separated list. How to set 
the PATH varies between versions of Windows; on XP it is (IIRC) in 
"Control Panel => System => Advanced => Environment variables" (or, if I 
didn't RC, somewhere not too far from that).
2. Start a Dos Box (for instance by invoking cmd.exe in the Execute item 
of your Start Menu). You may keep that Dos Box constantly open, it is 
very useful. Start gvim from the command-line, as (e.g.)

        gvim.exe filename.ext

or even without a filename if you want it to open on its "splash screen" 
without editing an existing file.


Best regards,
Tony.
-- 
The basic idea behind malls is that they are more convenient than
cities.  Cities contain streets, which are dangerous and crowded and
difficult to park in.  Malls, on the other hand, have parking lots,
which are also dangerous and crowded and difficult to park in, but --
here is the big difference -- in mall parking lots, THERE ARE NO
RULES.  You're allowed to do anything.  You can drive as fast as you
want in any direction you want.  I was once driving in a mall parking
lot when my car was struck by a pickup truck being driven backward by a
squat man with a tattoo that said "Charlie" on his forearm, who got out
and explained to me, in great detail, why the accident was my fault,
his reasoning being that he was violent and muscular, whereas I was
neither.  This kind of reasoning is legally valid in mall parking
lots.
                -- Dave Barry, "Christmas Shopping: A Survivor's Guide"

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to