fzf.vim icon indicating copy to clipboard operation
fzf.vim copied to clipboard

Add configuration to switch between quickfix and loclist

Open mtzeng opened this issue 5 years ago • 4 comments

mtzeng avatar Jul 17 '19 14:07 mtzeng

Use variable 'g:fzf_list_type' to switch between quickfix and location list. " Use quickfix (default option) let g:fzf_list_type = 1 " Use location list let g:fzf_list_type = 2

mtzeng avatar Jul 17 '19 14:07 mtzeng

This looks like it would address #432 and #448

matt-snider avatar Jul 29 '19 16:07 matt-snider

I would appreciate this functionality as well. Unique search results for individual tabs are something I use frequently. I just switched from ctrlp to fzf with this commit, and will report any issues.

I would suggest a change though: use the same behavior for the Ag handler. I changed

https://github.com/junegunn/fzf.vim/blob/52fbef6eb3ff99db9d8ed2a91fcebe4e66e01d53/autoload/fzf/vim.vim#L690

to

if get(g:, 'fzf_list_type', 1) == 1                                           
  call s:fill_quickfix(list, 'cfirst')                                        
else                                                                          
  call s:fill_loclist(list, 'lfirst')                                         
endif   

Thanks to all the authors, so far this plugin is spectacular!

pfheatwole avatar Nov 16 '19 18:11 pfheatwole

@junegunn can you pls approve that old PR?

Grueslayer avatar Jul 16 '21 11:07 Grueslayer

@junegunn Please let me know if there's something you don't like about the proposed implementation. I'm happy to rework it in 2023.

artemvmin avatar Jan 18 '23 08:01 artemvmin

I'm still very excited about this. Please let me know how I can help.

artemvmin avatar May 17 '23 22:05 artemvmin

let g:fzf_vim = {}
let g:fzf_vim.listproc = { list -> fzf#vim#listproc#location(list) }

" Per command (listproc_{command_name_in_lowercase})
let g:fzf_vim.listproc_rg = { list -> fzf#vim#listproc#quickfix(list) }

junegunn avatar Sep 05 '23 15:09 junegunn