[python] Allow user to customize fill column
This commit is contained in:
parent
a28e776b84
commit
0a6c619194
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue