- Src: https://github.com/westurner/venv.vim
- Docs: https://westurner.github.io/dotfiles/venv
- Docs: https://westurner.github.io/tools/#venv
venv.vim is a vim plugin that makes changing the current working directory (pwd) and listing and opening files and directories identified with standard virtualenv, virtualenvwrapper, conda, and venv environment variables very easy.
See venv for a full list of environment variables and shortcuts.
Contents
:Cd
,:Tabnew
, and:E
commands- functions and commands for changing to
venv directories (
:Cdsrc
,:Cdetc
,:Cdwrd
, [...]) - functions and commands for opening new
tabs and editing paths
(
:Tabneww
(:Tabnewwrd
) and:Ew
(:Ewrd
)) - packaged as a vim plugin (with a
doc/
and aplugin/
directory). Install just like any other vim plugin. - Tab completion
Install venv.vim with Vundle or a different vim plugin manager:
" Vundle
Bundle 'https://github.com/westurner/venv.vim'
"let g:venv_list_only_dirs = 1
# Don't list files in Cd-completions (this is the default)
g:venv_list_only_dirs = 1
# Do list files in Cd-completions
g:venv_list_only_dirs = 0
:Cdhelp -- list all defined cdaliases
:Cdhome :Cdh -- cd to $HOME
:Cdwrk -- cd to $__WRK
:Cdv -- cd to $VIRTUAL_ENV
:LCds -- lcd to $_SRC
:Lcds -- lcd to $_SRC
:Cdwrd :Cdw -- cd to $_WRD
:Cdw docs/ -- cd to $_WRD/docs/
:Cdw d<tab> -- tab-complete from $_WRD
:Ew d<tab> -- tab-complete from $_WRD
:Ew -- :e $_WRD
:Tabneww d<tab> -- tab-complete from $_WRD
:Tabneww -- :tabnew $_WRD