将 Quickfix window 全局定位到底部

Position a Quickfix window to the bottom down globally

我用 amix/vimrc 设置了我的 vim。 Quickfix window 位于 NERDTree 下方,如下所示。

如何将它移到底部?我按照this thread,在my_configs.vim

中添加了以下代码
augroup DragQuickfixWindowDown
    autocmd!
    autocmd FileType qf wincmd J
augroup end

但是,Quickfix window 仍然在右下角。

我想要这样的行为,

我的相关设置是,

"a global quickfix window on the bottom down
augroup DragQuickfixWindowDown
    autocmd!
    autocmd FileType qf wincmd J
augroup end

" Open Quickfix window automatically after running :make
augroup OpenQuickfixWindowAfterMake
        autocmd QuickFixCmdPost [^1]* nested cwindow
        autocmd QuickFixCmdPost    1* nested lwindow
augroup END


"compile and run
" Quick compile and run kinds of files via ,p
nmap <F10> :call <SID>compile_and_run()<CR>

function! s:compile_and_run()
    exec 'w'
    exec 'vertical rightbelow copen 80'
    exec 'wincmd w'
    if &filetype ==# 'c'
        exec 'AsyncRun! gcc % -o %<; time ./%<'
    elseif &filetype ==# 'cpp'
       exec 'AsyncRun! g++ -std=c++11 % -o %<; time ./%<'
    elseif &filetype ==# 'rust'
       exec 'AsyncRun! rustc %; time ./%<'
    elseif &filetype ==# 'java'
       exec 'AsyncRun! javac %; time java %<; rm -f *.class'
    elseif &filetype ==# 'sh'
       exec 'AsyncRun! time bash %'
    elseif &filetype ==# 'python'
       exec 'AsyncRun! time python3 "%"'

将此命令放入存储在此路径中的文件中 ~/.vim/after/ftplugin/qf.vim :

wincmd J " Forces QFW to go to bottom of screen across all windows

重新加载 vim 并且 quickfix window 应该在底部。