1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
;;; helm-virtualenvwrapper.el --- A helm-source for virtualenvwrapper.el
;; Copyright (C) 2014 Javier Olaechea
;; Version: 0.2.0
;;; Commentary:
;; To start using define a python-local keybinding or a global one such as:
;;
;; (define-key python-mode-map (kbd "C-c v") 'helm-venv-workon)
;; (global-set-key (kbd "C-c v") 'helm-venv-workon)
;;
;; Then C-c v away
;;;###autoload
(defun helm-venv-workon ()
"Like venv-work, for helm."
(interactive)
(helm :sources '(helm-source-venv)))
(defvar helm-source-venv
`((name . "Virtual env completion")
(candidates . ,(cl-loop
for venv in (venv-get-candidates)
collect (cons venv venv)))
(action . (("activate" . venv-workon)))
(persistent-action . venv-workon)
(persistent-help . "Activate the virtualenv.")))
;;; helm-virtualenvwrapper.el ends here
|