[python] Allow user to customize fill column

This commit is contained in:
Swaroop C H 2015-09-21 16:29:23 -07:00 committed by syl20bnr
parent a28e776b84
commit 0a6c619194
3 changed files with 13 additions and 1 deletions

View file

@ -18,6 +18,8 @@
- [[#testing][Testing]]
- [[#refactoring][Refactoring]]
- [[#other-python-commands][Other Python commands]]
- [[#configuration][Configuration]]
- [[#fill-column][Fill column]]
* Description
This layer adds support for the Python language.
@ -169,3 +171,10 @@ Test commands (start with ~m t~ or ~m T~):
| ~SPC m h H~ | open documentation in =firefox= using [pylookup][pylookup] |
| ~SPC m v~ | activate a virtual environment with [[https://github.com/yyuu/pyenv][pyenv]] |
| ~SPC m V~ | activate a virtual environment with [[https://github.com/jorgenschaefer/pyvenv][pyvenv]] |
* Configuration
** Fill column
If you want to customize the fill column value, use something like this inside the ~user-init~ function in your ~.spacemacs~:
#+BEGIN_SRC elisp
(setq python-fill-column 99)
#+END_SRC

View file

@ -21,3 +21,6 @@
(defvar python-test-runner 'nose
"Test runner to use. Possible values are `nose' or `pytest'.")
(defvar python-fill-column 79
"Fill column value for python buffers")

View file

@ -123,7 +123,7 @@
(defun python-default ()
(setq mode-name "Python"
tab-width 4
fill-column 79
fill-column python-fill-column
;; auto-indent on colon doesn't work well with if statement
electric-indent-chars (delq ?: electric-indent-chars))
(annotate-pdb)