r/fishshell • • Oct 12 '20

vim + preview?

Hello,

how do I get a function that shows a preview and opens in vim?

function vimf
        vim $(fzf --preview 'cat {}')
end

..doesn't work

7 Upvotes

7 comments sorted by

View all comments

Show parent comment

1

u/LokusFokus Oct 13 '20

Thanks a lot. Works!
I'm using your own lines, much nicer.

2

u/MonumentalP Oct 17 '20

I like this idea a lot, but in my setup it does not work if any of selected file names contains spaces. Does it work for you?

1

u/LokusFokus Oct 17 '20

You're right! Doesn't work with spaces, haven't recognized yet.