junegunn / fzf.vim

fzf :heart: vim
MIT License
9.55k stars 583 forks source link

[feature request] display the full path first in preview window, then display the content #1403

Closed zhuzhzh closed 2 years ago

zhuzhzh commented 2 years ago

I always open the makefiles from the different directory. These directory paths are always long and similar. It's hard for me to use Files/History command in fzf.vim.

but I found vim-clap displays the complate full path in the preview windows first. This is one good idea. Could fzf.vim provide the same feature to resolve the long-path issue?

Thanks!

junegunn commented 2 years ago

Preview script uses bat, if you have it installed, you can configure the output style via BAT_STYLE environment variable.

For example, put this in your shell configuration file

export BAT_STYLE=full

Or you can put it in your .vimrc like so

let $BAT_STYLE = 'full'
zhuzhzh commented 2 years ago

Thanks a lot! It works as wanted.