On 2023-06-07, Munif Tanjim wrote:
> Might be that I'm misunderstanding the expected behavior.
> 
> If it's not supposed to be opened under curwin, would it be possible to change
> the default behavior to open with WSP_BOT (instead of WSP_BELOW)?

I didn't like the default behavior, either, so I added this to my
~/.vim/after/ftplugin/qf.vim.

    " The following is taken from the QFEnter.vim plugin,
    " http://vim.sourceforge.net/scripts/script.php?script_id=4778,
    " by yssl.  I extracted and simplified the part I needed:  When
    " jumping to items from the quickfix window, open them in the
    " previous window instead of the window above the quickfix
    " window.

    nnoremap <buffer> <silent> <CR> :call QfEnter()<CR>
    let b:undo_ftplugin .= "| nunmap <buffer> <CR>"

    function! QfEnter()
        let l:lnum = line('.')
        wincmd p
        try
            exe 'cc' l:lnum
            normal! zv
        catch /E37/
            if &errorbells
                normal \<Esc>               " Generate a bell
            endif
            echohl ErrorMsg
            echo matchstr(v:exception, ':\zs.*')
            echohl None
        endtry
    endfunction

HTH,
Gary

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20230625191658.GH6600%40phoenix.

Raspunde prin e-mail lui