init-python-mode.el 476 B

1234567891011121314151617181920
  1. (setq auto-mode-alist
  2. (append '(("SConstruct\\'" . python-mode)
  3. ("SConscript\\'" . python-mode))
  4. auto-mode-alist))
  5. (require-package 'pip-requirements)
  6. (defun my-python-compile ()
  7. "Use compile to run python programs"
  8. (interactive)
  9. (compile (concat "python " (buffer-name))))
  10. (setq compilation-scroll-output t)
  11. (add-hook 'python-mode 'run-python)
  12. (define-key evil-normal-state-map (kbd "C-c o") #'my-python-compile)
  13. (provide 'init-python-mode)