I want to be able to reach source code from my virtualenv library via ctags but to be able to do this I need to know which virtualenv is currently active, so for example, I have this code in my .vimrc which appends django to my ctags index:
nnoremap <F7> :!ctags -R --python-kinds=-i -a ~/.virtualenvs/MYPROJECT/lib/python2.7/site-packages/django/*<CR>
Instead of hardcoding the path I want it to do something like:
nnoremap <F7> :!ctags -R --python-kinds=-i -a CURRENT_PROJECT_PACKAGES_PATH/django/*
so I can index packages from the current project I am working on.
You could use $VIRTUAL_ENV to get to your library, so it’d be something like this