Polished emacs.d config
This commit is contained in:
24
emacs.d/config/config-python.el
Normal file
24
emacs.d/config/config-python.el
Normal file
@@ -0,0 +1,24 @@
|
||||
(require 'python)
|
||||
(setq
|
||||
python-shell-interpreter "ipython"
|
||||
python-shell-interpreter-args "--pylab"
|
||||
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")
|
||||
|
||||
(add-hook 'python-mode-hook 'auto-complete-mode)
|
||||
(add-hook 'python-mode-hook '(lambda () (require 'nose)))
|
||||
(add-hook 'python-mode-hook 'jedi:setup)
|
||||
|
||||
(eval-after-load "python"
|
||||
'(progn
|
||||
(define-key python-mode-map (kbd "C-c C-d") 'helm-pydoc)))
|
||||
|
||||
(setq jedi:complete-on-dot t)
|
||||
|
||||
(provide 'config-python)
|
Reference in New Issue
Block a user