If I map a command in vim using something like
map <f4> :! pdflatex %<cr>
Vim will ignore my alias for pdflatex (something like alias pdflatex='pdflatex --temp-dir=something'). Is it possible to make vim not ignore it?
If I map a command in vim using something like
map <f4> :! pdflatex %<cr>
Vim will ignore my alias for pdflatex (something like alias pdflatex='pdflatex --temp-dir=something'). Is it possible to make vim not ignore it?
Vim 'ignores' your aliases because your shell is not in a 'mood' to parse your .bash_profile/.bashrc
(you did not specify, where your aliases are defined) because it is not started as a login/interactive shell (read here to find out more about what is read when and for what reason).
So, you have several options:
pdflatex
alias into a script and call that'set shell=/bin/bash\ -l'
, put your aliases to .bash_profile:! bash -l -i -e 'pdflatex .'
~/.bashrc
- only interactive/non-interactive does.
Commented
Sep 28, 2009 at 11:44
set shell=/bin/bash\ -li
in .vimrc did the trick. works fine on mac sierra. did not have to copy or move aliases at all thx!
Commented
Jul 10, 2020 at 21:06