【发布时间】:2016-03-20 00:33:36
【问题描述】:
我正在尝试在 Windows 上的 GVIM 中将 Powershell 设置为 shell。
当我执行:!ls 时,我得到一个带有我正在运行的命令的vimrun.exe 窗口,这似乎什么也没做。在我关闭它之前它会保持这种状态。
我的.vimrc 配置:
set shell=powershell
set shellcmdflag=-command
set shellquote=\"
set shellxquote=
没有任何干扰:当我执行:verbose set shell? shellcmdflag? shellquote? shellxquote? 时,我得到了上面设置的值。
当我从 %PATH% 中删除 vimrun.exe 时,我得到一个 Powershell 窗口,它只是空的(其中没有输出),具有相同的行为。
命令本身很好 - 当我从 cmd 手动执行它时,它按预期工作。
当 Vim shell 设置为 cmd 时,一切正常。
有些问题看似相关,但并不相同:
-
gvim on windows 7 - vimrun.exe doesn't run command
(非常相似的问题,但shell=cmd,这不是我的情况) - Vim with Powershell
- Using PowerShell as VIM shell
- powershell as gvim(vim) :shell
【问题讨论】:
标签: powershell vim