Created
November 26, 2015 22:41
-
-
Save diasjorge/74586d60c65c369a9008 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(venv-initialize-interactive-shells) ;; if you want interactive shell support | |
(venv-initialize-eshell) | |
(defun activate-corresponding-virtual-env () | |
(interactive) | |
(require 'fiplr) | |
(let ((dirname (file-name-nondirectory (fiplr-root)))) | |
(message dirname) | |
(if (member "eureka-template" (venv-list-virtualenvs)) | |
(venv-workon dirname)))) | |
(add-hook 'python-mode-hook (lambda () | |
(hack-local-variables) | |
(if (boundp 'project-venv-name) | |
(venv-workon project-venv-name) | |
(activate-corresponding-virtual-env)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment