Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display completion on multiple columns [FR] #195

Open
alecandido opened this issue Feb 24, 2021 · 8 comments
Open

Display completion on multiple columns [FR] #195

alecandido opened this issue Feb 24, 2021 · 8 comments
Labels
enhancement New feature or request

Comments

@alecandido
Copy link

Just a quick feature: multicolumns

Problem

Often my terminals are wider than taller.

Describe the solution you'd like

The one in the title.

Additional context

I just moved to fzf-tab from the default autocompletion coming with oh-my-zsh. It's wonderful and plenty of features, but the very only thing I lack it's having the completion spanning the full length of my terminal.
This is not always what I want: sometimes it's far better to have them on a single column, e.g. when the options are described, but this is exactly what happened with the former completion (oh-my-zsh).

Probably it's just a matter of taste, but I tried to look in the repo, the wiki and the issues for configuring fzf-tab this way and I didn't find anything. Since quite a lot of other configs are available, why not this one? (the moment someone is able to implement it...)

@alecandido alecandido added the enhancement New feature or request label Feb 24, 2021
@NightMachinery
Copy link
Contributor

This should be a feature request for fzf, no?

@alecandido
Copy link
Author

I might be wrong but the bare fzf displays differently form fzf-tab on my machine, so I assume it is doing some formatting.

At the end of the day fzf it's supposed to be the backend, not the formatter, am I wrong?

  • fzf
    image
  • fzf-tab
    image

@NightMachinery
Copy link
Contributor

It's not impossible to implement this on top of fzf, but it would be a hack. This feature is a general thing for fzf, and needs to be its own thing. Worst case scenario, the hack itself needs to be a separate repo fzf-multicolumn, so that it is reusable.

PS: Check out lib/-ftb-fzf to see the fzf command that fzf-tab finally runs.

@Aloxaf
Copy link
Owner

Aloxaf commented Feb 27, 2021

As NightMachinary said, this is impossible unless I fork fzf. (In fact, I indeed have such a plan)

@NightMachinery
Copy link
Contributor

As NightMachinary said, this is impossible unless I fork fzf. (In fact, I indeed have such a plan)

fzf might accept a PR there: junegunn/fzf#1476

@alecandido
Copy link
Author

alecandido commented Feb 28, 2021

Looks like junegunn also provided a solution using tmux, using an alternative command that is directly available from the fzf main repo: fzf-tmux

If you're on tmux, using fzf-tmux can be an option. e.g. fzf-tmux -r 20%

It's not really the multicolumn layout I wished, but it can be an option, at least for someone.
Is it possible to use that one as a backend for fzf-tab? Just adding it in the configuration like:

zstyle ':fzf-tab:*' fzf-command "fzf-tmux -r 20%"

(this exact one is currently not working)

@NICHOLAS85
Copy link
Contributor

Checkout https://github.com/Aloxaf/fzf-tab/wiki/Configuration#fzf-command if you want to use fzf-tmux

@alecandido
Copy link
Author

alecandido commented Feb 28, 2021

@NICHOLAS85 I checked, and indeed I took the command above exactly from there, but it is not junegunn's fzf-tmux!

Moreover ftb-tmux-popup explicitly requires tmux version 3.2, and e.g. I'm on plain Ubuntu 20.10 (rather a common setup) and tmux version is 3.1b.
Thank you very much for your advice, it's quite fancy and interesting (this is why I already checked 😉) but definitely it's not the same thing.

P.S.: mine was a follow up on @NightMachinary 's linked PR, but it's rather off topic in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants