X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/2941a5201cf0c7050cf8750d1c4f311dd292940c..f22f606c1e47a3e45407576d4b5c33367255ea1a:/ftplugin/python_flake8.vim diff --git a/ftplugin/python_flake8.vim b/ftplugin/python_flake8.vim index 52d9fdf..0b386c7 100644 --- a/ftplugin/python_flake8.vim +++ b/ftplugin/python_flake8.vim @@ -22,6 +22,16 @@ 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 + +let s:flake8_max_complexity="" +if exists("g:flake8_max_complexity") + let s:flake8_max_complexity=" --max-complexity=".g:flake8_max_complexity +endif + if !exists("*Flake8()") function Flake8() if !executable(s:flake8_cmd) @@ -43,7 +53,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.s:flake8_max_complexity silent! grep! % " restore grep settings