powershell as gvim(vim) :shell

2020-07-10 09:05发布

问题:

i'm on a Windows 7 machine and i've installed Gvim(win32 version not MinGW or something alike), i've written in my _vimrc

set shell=powershell.exe

Now when i type :shell command it must open a new buffer with powershell in it but instead it opens powershell in a new window.

Question : Is there a way to set Gvim ( configuration or plugin ) to open PowerShell in a buffer (like bash)?

回答1:

  1. Reread documentation for :shell and design-not. Quote from design-not:

    Vim is not a shell or an Operating System. You will not be able to run a shell inside Vim or use it to control a debugger. This should work the other way around: Use Vim as a component from a shell or in an IDE. A satirical way to say this: "Unlike Emacs, Vim does not attempt to include everything but the kitchen sink, but some people say that you can clean one with it. ;-)"

  2. Of course, somebody does not like this. There are some projects that make it possible to run shell inside vim, most known is Conque which now has windows support. Note that it does not work with unicode.