作者Holocaust123 (奔跑的蜗牛)
看板Editor
标题[vim ] 在Windows上改变vim预设的shell
时间Mon Apr 18 07:43:35 2011
(OS是XP)
cmd.exe是Windows版vim预设的外部shell
(在vim中输入
:echo &shell会看到
C:\Windows\system32\cmd.exe)
也就是输入
:![some_command]後vim会用这个 shell 来执行 some_command:
C:\Windows\system32\cmd.exe
/c some_command
安装Cygwin後我想把这个 shell 改成 mintty (路径是C:\cygwin\bin\mintty.exe)
在.vimrc中输入set shell=C:\\cygwin\\bin\\mintty.exe後
我发现输入:!some_command後会是这样:
C:\cygwin\bin\mintty
/c some_command
其中
/c 是cmd.exe的参数 不应该出现在这的
查了很多 help 还是不知道为什麽会出现这种情况 orz
请问有人知道要怎麽把他去掉吗?
补个图:
http://i.imgur.com/DIIlq.jpg
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.30.46
※ 编辑: Holocaust123 来自: 140.112.30.46 (04/18 07:45)
1F:→ Holocaust123:自问自答... :h shellcmdflag 04/18 09:06