From: Vincent Driessen Date: Thu, 8 May 2014 08:58:56 +0000 (+0200) Subject: Merge pull request #26 from mmedvede/add-quickfix-location X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/8a573a9806eacf000b03b4bbf37aff4ce06d73a6?hp=947f660844168bf154049642f8baa0f74bad2297 Merge pull request #26 from mmedvede/add-quickfix-location Add quickfix location --- diff --git a/README.mdown b/README.mdown index f84055b..4db8b3b 100644 --- a/README.mdown +++ b/README.mdown @@ -54,6 +54,9 @@ To customize the location of your flake8 binary, set `g:flake8_cmd`: let g:flake8_cmd="/opt/strangebin/flake8000" +To customize the location of quick fix window, set `g:flake8_quickfix_location`: + + let g:flake8_quickfix_location="topleft" Tips ---- diff --git a/ftplugin/python_flake8.vim b/ftplugin/python_flake8.vim index 38bb6f7..b26d9a1 100644 --- a/ftplugin/python_flake8.vim +++ b/ftplugin/python_flake8.vim @@ -61,6 +61,12 @@ if !exists("*Flake8()") let s:flake8_max_complexity="" endif + if exists("g:flake8_quickfix_location") + let s:flake8_quickfix_location=g:flake8_quickfix_location + else + let s:flake8_quickfix_location="belowright" + endif + " perform the grep itself let &grepformat="%f:%l:%c: %m\,%f:%l: %m" let &grepprg=s:flake8_cmd.s:flake8_builtins_opt.s:flake8_ignores.s:flake8_max_line_length.s:flake8_max_complexity @@ -73,7 +79,7 @@ if !exists("*Flake8()") " open cwindow let has_results=getqflist() != [] if has_results - execute 'belowright copen' + execute s:flake8_quickfix_location." copen" setlocal wrap nnoremap c :cclose nnoremap q :cclose