~ / blog / Change `$PATH` inside vim

       

  1 minute(s)

       

  neovim, vim, osx

Save the following script in /usr/local/bin/cpvim

#!/bin/zsh
source ~/.zshrc >/dev/null 2>&1
PATH=$VIM_PATH
exec nvim "$@"
#!/bin/zsh
source ~/.zshrc >/dev/null 2>&1
PATH=$VIM_PATH
exec nvim "$@"

Add the following to your .zshrc

alias vim=/usr/local/bin/cpvim
alias vim=/usr/local/bin/cpvim