我的.bashrc中的vim - run:!命令

时间:2011-12-07 18:14:55

标签: bash vim

  

可能重复:
  Commands executed from vim are not recognizing bash command aliases
  Why doesn't my vim know my alias?

说我订了 alias kapow='grep' 在我的.bashrc中,我之后来源。

我打开vim,输入

:!kapow "dude"

但是vim尝试运行/ bin / bash kapow,当我真的希望它运行我的别名时。

如何从vim内部的bashrc运行命令(不留下:shell)?

1 个答案:

答案 0 :(得分:9)

vim manual说明:!

  

在Unix上,该命令通常在非交互式shell中运行。如果你想使用交互式shell(使用别名),请将'shellcmdflag'设置为“-ic”。

相关问题