Is there a way to open just the quickfix list without jumping to the first result when using :lt
? I am using :lt
to populate the location list with tags that match with the following binding:
nmap <expr> <Leader>t ":lt /" . input("", "", "tags") . "<CR>:lop<CR><C-k><C-o><C-j>"
which works to some degree. Given that <C-k>
and <C-j>
are mappings for the associated window movement commands, this breaks down if the quickfix window is below some complex set of splits. :h tag-matchlist
and :h quickfix
don't seem to offer any helpful information. However, some options like :cgete
seem like the functionality is there, as they specify "but don't jump to the first error", which isn't an option for :lt
as it specifies"Jump to tag" as part of its behavior.
So, the new question is: how can I populate the location list with tags matching a pattern without jumping to the first match?
I am currently working on trying to get it to work with :taglist()
and :lgete
.
:make
do jump to the first result (unless suppressed with!
), I don't see that behavior for:copen
, nor is it documented. Please check that you don't have some customization (:autocmd
) that provides this behavior.au
setup that would do this. Even with a completely empty.vimrc
, doing:lt /<match>
will always jump to the first result. I worded this incorrectly in that this is a behavior of:lt
, not:cope/:lop
.