M HYPE SPLASH
// updates

Starting vim from Windows PowerShell

By Emma Terry

This isn't necessarily a problem, I'm more curious why this behavior occurs.

When attempting to launch vim from powershell, I'm greeted with the Open with window:

PS C:\> vim

enter image description here

If I specify:

PS C:\> vim.exe

Vim launches as expected. gVim launches as expected no matter if I specify:

PS C:\> gvim.exe

or

PS C:\> gvim

Again, it's not really problem, I just want to know why it happens and what I should look into to get consistent behavior when launching both vim and gvim from powershell.

2 Answers

There's probably a file called vim. that appears in the Path before vim.exe (or it's in the local folder you're trying to launch vim from) so it's getting called first when you type vim.

1

create alias for vim

 Set-Alias vim ' C:\Program Files (x86)\Vim\vim74\gvim.exe' Set-Alias vi ' C:\Program Files (x86)\Vim\vim74\gvim.exe'

you can change the path if installed in different directory.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy