From 08f1f2b1f5073ea7b9e4e914eb1c34279af4ea24 Mon Sep 17 00:00:00 2001 From: Mikhail Medvedev Date: Wed, 7 May 2014 18:58:48 -0400 Subject: [PATCH] Added option to specify location of the quickfix window E.g. use "topleft" to put the quickfix on top --- ftplugin/python_flake8.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.39.5