tags:

views:

118

answers:

1

On my old Windows XP laptop, which I set up about 2 years ago, I have vim71 installed. I renamed vim.exe to vi.exe. And when I invoke vi with a file name from a Windows Command Prompt, vi opens up the file in a new window. (By "new window", I mean a window in the Microsoft Windows sense, not in the vi sense.) The Command Prompt is then available to accept a new command.

I am now trying to configure vim similarly on a new Windows 7 laptop. I installed vim72 (the latest version), and I renamed vim.exe to vi.exe. Now, when I invoke vi with a file name from a Windows Command Prompt, vi opens the file inside the Command Prompt window (instead of opening up a new Microsoft Windows window).

How can I get vi to open up files in a new Microsoft Windows window? (Is this a difference between vim71 and vim72, or a difference between vim on XP and vim on Windows 7, or something else?)

+1  A: 

You want to run gvim.exe instead of vim.exe.

gvim.exe launches the GUI version of Vim, whereas vim.exe just runs inside a command-prompt window (as you've discovered). I believe it's been this way for at least the last several versions.

Instead of renaming gvim.exe to vi.exe, consider using an alias or a batch file to call the executable under its existing name. The Windows version of Vim includes several other programs that expect the GUI version of Vim to be called gvim.exe, so changing the name is likely to break something.

Bill Odom
Yes, that did the trick. I copied (not moved) gvim.exe to vi.exe, and it's working great. Thanks!
Mike W