Emacs config utilizing prelude as a base
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.3 KiB

  1. # Prelude Python
  2. !!! Note
  3. This module builds on top of the shared [Programming](programming.md) module.
  4. ## Python Mode
  5. Emacs comes with Python programming support through the built-in
  6. `python-mode`. Whenever you are editing Python code run `C-h m` to
  7. look at the Python mode key bindings. Alternatively look at the
  8. menu bar entries under Python. To toggle the menu bar press `F12`.
  9. ## Syntax checking
  10. Prelude ships with [Flycheck](https://github.com/flycheck/flycheck),
  11. an on the fly syntax checker. Flycheck has support for two Python
  12. syntax checkers, [Pylint](http://www.pylint.org/) and
  13. [Flake8](http://flake8.readthedocs.org/en/latest/). In
  14. order to have Flycheck support on the fly syntax checking for
  15. Python you need to have either of these installed and accessible to
  16. Emacs. In order to manually choose a checker run `C-c ! s`.
  17. ## Automatic insertion of # coding: utf-8
  18. Previously `prelude-python` had this feature enabled by default, but
  19. that is only necessary on Python2, because Python3 already use utf-8
  20. as default encoding. In 2020, python2 becames deprecated, so that
  21. functionallity becames a annoying side-effect for some users. If you
  22. wish to enable this, add this to your config file:
  23. ```emacs-lisp
  24. (setq prelude-python-mode-set-encoding-automatically t)
  25. ```