Zshell aliases like! Gst inside vim?

Is there a way to run my zshell aliases inside vim with the output going to a new split?

I am using aliases oh-my-zsh git such as gst and I can not do :!gst inside vim.

thanks

+6
source share
2 answers

Try

: set shell = zsh \ -l

And set the alias setting to ~/.zshenv

Here is a similar question vim terminal does not load .zshrc .

+6
source

@ tim-green is right!

As the man page says:

Then the commands are read from $ ZDOTDIR / .zshenv. If the shell is the shell login, the commands are read from / etc / zprofile, and then $ ZDOTDIR / .zprofile. Then, if the shell is interactive, the commands are read from / etc / zshrc, and then $ ZDOTDIR / .zshrc.

Since you do not want to use the interactive shell in vim (using ! At least), your only solution is to add (or source ) your aliases inside ~/.zshenv .

Just!

EDIT: no other modification is required except to put:

 set shell=/bin/zsh 

in your vimrc.

0
source

All Articles