junegunn / fzf.vim

fzf :heart: vim
MIT License
9.51k stars 581 forks source link

[fzf#vim#grep / Ag / Rg / RG] Multi-line display for narrow screens #1549

Closed junegunn closed 4 weeks ago

junegunn commented 1 month ago

Display PATH:LINE:COL on a separate line for narrow screens. Requires Perl and fzf 0.53.0 (not yet released).

Usage

" [Ag|Rg|RG] Display path on a separate line for narrow screens (default: 0)
" * Requires Perl and fzf 0.53.0 or later
let g:fzf_vim.grep_multi_line = 0
   " PATH:LINE:COL:LINE
let g:fzf_vim.grep_multi_line = 1
   " PATH:LINE:COL:
   " LINE
let g:fzf_vim.grep_multi_line = 2
   " PATH:LINE:COL:
   " LINE
   " (empty line)

Screenshots

let g:fzf_vim.grep_multi_line = 0

image

let g:fzf_vim.grep_multi_line = 1

image

let g:fzf_vim.grep_multi_line = 2

image
amariusz commented 2 days ago

I found this pull from link in the documentation - https://junegunn.github.io/fzf/releases/0.53.0/ Multi-line feature is such a great news!

BTW There's probably a typo in the description - should be g:fzf_grep_multi_line not g:fzf_vim.grep_multi_line

junegunn commented 2 days ago

No it's not a typo. While the former name is still supported for backward compatibility, we recommend putting all configs in g:fzf_vim dictionary.

See https://github.com/junegunn/fzf.vim?tab=readme-ov-file#configuration-options-for-fzfvim.

https://github.com/junegunn/fzf.vim/blob/279e1ec068f526e985ee7e3f62a71f083bbe0196/autoload/fzf/vim.vim#L31-L34

amariusz commented 2 days ago

Thanks for clarification. I've missed that change. Can't wait for 0.54 with --wrap support.

You're amazing! Thank you so much for everything you do! Can't live without fzf anymore :D