Friday, August 27, 2010

RE: WIN7 Can not set vim 7.3 as default program

Steve Hall wrote:
>> I suppose some work with the NSIS installer config would allow an
>> option (default?) to register Vim during install?
>
> Extremely easy to do this (two lines), but I'd need
> overwhelming support here for me to add it since:
>
> * The default Vim installer doesn't do this. (Somebody?)
> * It is bad behavior for an installer to modify OS defaults.
> * It is bad behavior for an installer to modify OS defaults without
> first warning.
> * It is bad behavior for an installer to modify OS defaults without
> first warning, by default...
>
> * ...so, we would put this in a "custom" option that a user would have
> to specifically select. But then it's not by default, even if
> someone picks "Full".
>
> * It is already super-easy to right-click on a .txt file, pick "Open
> With...", and select Vim. Same as with any other association, and
> the "correct" way to modify an OS default IMO.

Groan. I thought I would point out that your last comment re
"already super-easy" was incorrect because we've just had a
couple of people say it did not work (I think), but since I have
given up this kind of thing in Windows I thought I'd better
check first.

On a Windows XP system which had never seen Vim, I seem to have
proven you are totally correct. As an administrator, I ran the
"Vim without Cream" gvim-7-3-3.exe installer. I chose to add
"Edit with Vim" on the context menu, and took other defaults.

The first time Vim ran, it displayed a somewhat disconcerting
message (I know what this is, but it would alarm a new user):
Cannot load registered type library.
Do you want to register Vim now?

Pressing Enter twice fixed that.

Then, I did this:
In Windows Explorer, right click a file (say 'my.txt').
Choose Open With, Choose Program.
You may need to choose "Select the program from a list".
Browse and select gvim.exe under the directory where it was installed.
Choose "Always use the selected program to open this kind of file".
Now, whenever I double click a *.txt file, it opens in Vim.

Unfortunately, when I did this I mistakenly chose "vim.exe"
rather than "gvim.exe", and my patience ran out before I could
find an easy way to correct this (as I mentioned, on Windows I
do not use Explorer or file associations).

So, it looks like this just needs to be documented at:
http://vim.wikia.com/wiki/Download

yschandra reported that this did not work on Windows 7. I wonder
if yschandra was logged in with admin privilege. I'm not sure
whether that is necessary. When I did it as above (as admin),
the settings were configured for all users.

I agree with Steve's above comments about changing the defaults.

John

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: