我正在使用Windows gVim,并尝试调用运行在Cygwin的Bash上的命令。它可以工作,但是每次都将工作目录设置为$HOME。是否可能将其设置为当前文件所在的目录?
我在我的.vimrc
中有以下行:
set shell=C:/cygwin/bin/bash
set shellcmdflag=--login\ -c
set shellxquote=\"
我在我的.profile
文件中有以下几行代码:
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi