I have a number of aliased commands in my .bashrc and they work fine on the command line. However, if I use them in Vim, they do not work. For example:
:!mycommand
results in:
/binbash: mycommand: command not found
What is the explanation?
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this community
vim
invokes shells (e.g. requested by!
orsystem()
) as non-interactive and non-login shell, which means.bashrc
or.zshrc
are not read. You could try making it interactive by setting'shellcmdflag'
to"-ic"
.