ibhagwan / fzf-lua

Improved fzf.vim written in lua
MIT License
2.28k stars 149 forks source link

Question: Can we replace Tmux's default `list-buffer` UI with the fzf-lua version? #829

Closed erwin closed 1 year ago

erwin commented 1 year ago

I really like the fzf-lua tmux-buffers UI as you present it at the bottom of the SmartYank page under "Tmux".

I just wish I could make it the default even when my current window is some kind of shell rather than nvim.

I found this: https://github.com/sainnhe/tmux-fzf/blob/master/scripts/clipboard.sh that suggests maybe some customization is possible...

BTW, this and SmartYank are so awesome!

ibhagwan commented 1 year ago

Hi @erwin, perhaps it’s possible the code you sent suggests the possibility exists but

I just wish I could make it the default even when my current window is some kind of shell rather than nvim.

Fzf-lua is a neovim plugin it doesn’t work unless you’re inside neovim.

If I didn’t understand your question properly please further clarify what you mean?

ibhagwan commented 1 year ago

Closing, feel free to reopen if I misunderstood or you need more help.

erwin commented 1 year ago

My apologies, missed the earlier notification while traveling.

I realize that fzf-lua is a neovim plugin, but it's just so much better than the default tmux interface for pasting.

Since many tmux commands can launch shell scripts, my thinking was perhaps it could launch neovim with the -c command to directly execute your fzf tmux buffer script, and then depending on the selection, your plugin could write that to stdout and exit neovim.

I was thinking that would make for a much nicer interface for tmux by default than the current one...

ibhagwan commented 1 year ago

Since many tmux commands can launch shell scripts, my thinking was perhaps it could launch neovim with the -c command to directly execute your fzf tmux buffer script, and then depending on the selection, your plugin could write that to stdout and exit neovim.

That would be horribly inefficient, there really isn’t much to this provider, you can just pipe tmux list-buffers into fzf and you’ll have the same interface via the shell without the neovim proxy.