@@ -22,6 +22,7 @@ CONTENTS *pymode-contents*
2222 2.7 Run code................................................| pymode-run |
2323 2.8 Breakpoints.....................................| pymode-breakpoints |
2424 3. Code checking...............................................| pymode-lint |
25+ 3.1 Code checkers options..........................| pymode-lint-options |
2526 4. Rope support................................................| pymode-rope |
2627 4.1 Code completion..................................| pymode-completion |
2728 4.2 Find definition.................................| pymode-rope-findit |
@@ -89,14 +90,18 @@ Value is list of path's strings.
8990>
9091 let g:pymode_paths = []
9192
92- Trim unused white spaces on save *'g:pymode_trim_whitespaces'*
93+ Trim unused white spaces on save *'g:pymode_trim_whitespaces'*
9394>
9495 let g:pymode_trim_whitespaces = 1
9596
9697 Setup default python options *'g:pymode_options'*
9798>
9899 let g:pymode_options = 1
99100
101+ Setup max line length *'g:pymode_options_max_line_length'*
102+ >
103+ let g:pymode_options_max_line_length = 79
104+
100105 If this option is set to 1, pymode will enable the following options for
101106python buffers: >
102107
@@ -330,6 +335,40 @@ Definitions for |signs|
330335 let g:pymode_lint_info_symbol = 'II'
331336 let g:pymode_lint_pyflakes_symbol = 'FF'
332337
338+ ------------------------------------------------------------------------------
339+ 3.1 Set code checkers options ~
340+ *pymode-lint-options*
341+
342+ Pymode has the ability to set code checkers options from pymode variables:
343+
344+ Set PEP8 options *'g:pymode_lint_options_pep8'*
345+ >
346+ let g:pymode_lint_options_pep8 =
347+ \ {'max_line_length': g:pymode_options_max_line_length})
348+
349+ See https://pep8.readthedocs.org/en/1.4.6/intro.html#configuration for more
350+ info.
351+
352+ Set Pyflakes options *'g:pymode_lint_options_pyflakes'*
353+ >
354+ let g:pymode_lint_options_pyflakes = { 'builtins': '_' }
355+
356+ Set mccabe options *'g:pymode_lint_options_mccabe'*
357+ >
358+ let g:pymode_lint_options_mccabe = { 'complexity': 12 }
359+
360+ Set pep257 options *'g:pymode_lint_options_pep257'*
361+ >
362+ let g:pymode_lint_options_pep257 = {}
363+
364+ Set pylint options *'g:pymode_lint_options_pylint'*
365+ >
366+ let g:pymode_lint_options_pylint =
367+ \ {'max-line-length': g:pymode_options_max_line_length})
368+
369+ See http://docs.pylint.org/features.html#options for more info.
370+
371+
333372
334373==============================================================================
3353743. Rope support ~
0 commit comments