~ / blog / Change $PATH inside vim

Sat, Sep 19, 2015

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

#!/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