I have gVim and portable python stored in a DropBox folder on several machines. The location of the DropBox folder is different on each computer. However, I'd like to be able to setup the .vimrc so that it automatically references the correct python folder no matter what computer it's on.
For example, I have gVim in C:\DropBox\gVimPortable.
In my .vimrc, I have the following:
let s:pp = 'C:\DropBox\PortablePython_1.1_py2.5.4' " netbook
if (has('win32') || has('win64')) && isdirectory(s:pp)
let $PATH .= ';' . s:pp
endif
Is there a way to do something like the following?
let s:pp = $VIMRUNTIME.substring(0, regex.match(/gVimPortable/))."\PortablePython_1.1_py2.5.4"
if (has('win32') || has('win64')) && isdirectory(s:pp)
let $PATH .= ';' . s:pp
endif
Basically, I don't want to hard code the folder where my python runtime exists. It will always be in the same place relative to the gVim application.