Skip to content
kd
19 Sept 2015
Back to blog

Change `$PATH` inside vim

1 min read (11 words)

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

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

Citation

@online{krishnamurthy2015changepathinsidevim,
  author = {Dheepak Krishnamurthy},
  title = {Change `$PATH` inside vim},
  year = {2015},
  date = {2015-09-19},
  url = {https://kdheepak.com/blog/change-path-inside-vim/},
  langid = {en},
}

For attribution, please cite this work as:

Dheepak Krishnamurthy, "Change `$PATH` inside vim", September 19, 2015 https://kdheepak.com/blog/change-path-inside-vim/


Spotify and tmux
Uninstalling and re-installing Homebrew on OSX