Sten Kin Sten Kin - 2 months ago 11
Python Question

Vim: Change Max Line from 80 in pymode

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

Answer

If Python-Mode is using PyLint, you can specify what errors you wish for it to raise. This involves creating a customised pylint.rc and then giving that to pymode using a setting in your .vimrc.

.vimrc:

" Pylint configuration file
let g:pymode_lint_config = '$HOME/pylint.rc'

pylint.rc:

[FORMAT]

# Maximum number of characters on a single line.
max-line-length=120