Capturing Vim environment variables from bash scripts

In a recent bash script, I needed to obtain the value of the $VIM environment variable. Vim uses $VIM (as well as $HOME and $VIMRUNTIME) when computing various paths: http://vim.wikia.com/wiki/Open_vimrc_file#Location_of_vimrc. Default value of $VIM It is possible to find the default (fall-back) value for $VIM by inspecting the output of running vim –version. Here’s a […]