From 2aa5028219a5192be46a3d4eb3a7c93d113e9040 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Fri, 13 Jul 2012 14:07:27 +0200 Subject: [PATCH] Added option to configure max_line_length --- ftplugin/python_flake8.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ftplugin/python_flake8.vim b/ftplugin/python_flake8.vim index 52d9fdf..e3b3c61 100644 --- a/ftplugin/python_flake8.vim +++ b/ftplugin/python_flake8.vim @@ -22,6 +22,11 @@ if exists("g:flake8_ignore") let s:flake8_ignores=" --ignore=".g:flake8_ignore endif +let s:flake8_max_line_length="" +if exists("g:flake8_max_line_length") + let s:flake8_max_line_length=" --max-line-length=".g:flake8_max_line_length +endif + if !exists("*Flake8()") function Flake8() if !executable(s:flake8_cmd) @@ -43,7 +48,7 @@ if !exists("*Flake8()") " perform the grep itself let &grepformat="%f:%l:%c: %m\,%f:%l: %m" - let &grepprg=s:flake8_cmd.s:flake8_ignores + let &grepprg=s:flake8_cmd.s:flake8_ignores.s:flake8_max_line_length silent! grep! % " restore grep settings -- 2.39.5