omerxx / dotfiles

My dotfiles synced form localhost and remote machines
https://dotfiles.omerxx.com
956 stars 87 forks source link

feature: use fzf to open file from terminal in neovim, with file previews #14

Closed assafdori closed 2 months ago

assafdori commented 3 months ago

Just a cool alias I added to my personal .zshrc that's based on yours, by typing ''of'' (initials of openfile) into the terminal, it pops up an FZF search in the current dir with file previews, when you hit enter it opens the file in Neovim. I just didn't find anything similar in your setup and found this very helpful for me on some occasions.

image
omerxx commented 3 months ago

I use Telescope within Neovim :) https://github.com/omerxx/dotfiles/blob/master/nvim/lua/plugins/tele.lua

But this is a cool shell alias! Here's how it can be better by ignoring hidden files:

export FZF_DEFAULT_COMMAND='rg --hidden -l ""'
assafdori commented 3 months ago

I use Telescope within Neovim :) https://github.com/omerxx/dotfiles/blob/master/nvim/lua/plugins/tele.lua

But this is a cool shell alias! Here's how it can be better by ignoring hidden files:

export FZF_DEFAULT_COMMAND='rg --hidden -l ""'

I indeed use your telescope configuration whenever I'm within Neovim and need to get started editing a file quickly. Perhaps this is a sign I don't spend enough time within Neovim!

Thanks for the addition to ignore hidden files! It's indeed an annoyance to have all those hidden files show up as well!

Feel free to reject this PR if it doesn't fit your configuration's agenda :)