Closed shizhz closed 9 years ago
@shizhz Did you try http://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html ?
Example I have this in a .dir-locals.el
and I have one of these for each project
(
(python-mode
(python-shell-interpreter . "python")
(python-shell-interpreter-args . "/home/ale/work/project/code/project/manage.py shell")
(python-shell-prompt-regexp . "In \\[[0-9]+\\]: ")
(python-shell-prompt-output-regexp . "Out\\[[0-9]+\\]: ")
(python-shell-completion-setup-code . "from IPython.core.completerlib import module_completion")
(python-shell-completion-module-string-code . "';'.join(module_completion('''%s'''))\n")
(python-shell-completion-string-code . "';'.join(get_ipython().Completer.all_completions('''%s'''))\n")
(python-shell-virtualenv-path . "/home/ale/.virtualenvs/env")
)
)
@alep suggestion is good. I need to write some real docs :)
Hi,
I have several projects using virtualenv, how can I make the python environment setup automatically while switching projects?
Thanks :)