Reputation: 1301
I am trying to set up Powershell as shell in GVIM on Windows.
When I do :!ls
, I get a vimrun.exe
window with the command I am running, which seems to be doing nothing. It stays like that until I close it.
My .vimrc
configuration:
set shell=powershell
set shellcmdflag=-command
set shellquote=\"
set shellxquote=
Nothing interferes with it: when I do :verbose set shell? shellcmdflag? shellquote? shellxquote?
I get the values set above.
When I remove vimrun.exe
from %PATH%
, I get a Powershell window, which is just empty (no output in it) with same behavior.
The command itself is fine - when I execute it manually from cmd, it works as expected.
When Vim shell is set to cmd, everything works as expected as well.
There are questions that may seem related, but are not same:
shell=cmd
, which is not my case)Upvotes: 7
Views: 8106
Reputation: 1301
Turns out the issue was in 32-bit powershell not working correctly on my system (yet to figure out why). I changed set shell=powershell
to:
set shell=C:\\WINDOWS\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe
That launches 64-bit powershell, which works fine on my system.
Upvotes: 4