Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim: Change Max Line from 80 in pymode

Tags:

python

vim

I'm using the plugin Python-Mode, which has an PymodeLintAuto feature which 'Fix PEP8 errors in current buffer automatically'. I was wondering how I could change the max line length for that was. I couldn't find in the docs

like image 355
Sten Kin Avatar asked Apr 28 '14 15:04

Sten Kin


2 Answers

To change max line length in pymode you change

g:pymode_options_max_line_length

with let.

However this does not work for me, so do as @dillbert suggested. For the colorbar:

autocmd FileType python set colorcolumn=120

in your .vimrc

like image 67
Emilgardis Avatar answered Oct 10 '22 15:10

Emilgardis


In recent (as of June 2018) python-mode versions, the required configuration seems to be this:

let g:pymode_options_max_line_length = 88
let g:pymode_lint_options_pep8 = {'max_line_length': g:pymode_options_max_line_length}
let g:pymode_options_colorcolumn = 1
like image 29
Antonis Christofides Avatar answered Oct 10 '22 16:10

Antonis Christofides