fzf-tab icon indicating copy to clipboard operation
fzf-tab copied to clipboard

[FR] Allow to disable default bindings

Open doronbehar opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe.

I'd like to use tab for triggering the completion, and while in fzf, to select multiple arguments with it, until I press Enter.

Describe the solution you'd like I noticed this line:

https://github.com/Aloxaf/fzf-tab/blob/69024c27738138d6767ea7246841fdfc6ce0d0eb/lib/-ftb-fzf#L31

Which is unconditional. I'd like to disable the bindings for tab, btab and ctrl-space.

Describe alternatives you've considered

The only solution I found was simply editing the source code, which is not ideal of course.

Additional context

In addition to manually disabling most of the default bindings, I also noticed I had to add this as well:

zstyle ':fzf-tab:*' fzf-flags --expect=enter

I wonder why the default --expect doesn't include the enter key:

https://github.com/Aloxaf/fzf-tab/blob/69024c27738138d6767ea7246841fdfc6ce0d0eb/lib/-ftb-fzf#L90

The accept-line behavior is not desirable in my case.

doronbehar avatar Dec 14 '23 14:12 doronbehar

Now I see that I also talked about this in https://github.com/Aloxaf/fzf-tab/issues/362 .

doronbehar avatar Dec 14 '23 14:12 doronbehar

You can override default setting like zstyle ':fzf-tab:*' fzf-flags --bind "tab:toggle,btab:ignore,ctrl-space:ignore"


I wonder why the default --expect doesn't include the enter key:

enter is already bound to accept in fzf's default settings.

--expect=KEY[,..] Comma-separated list of keys that can be used to complete fzf in addition to the default enter key...

Aloxaf avatar Feb 21 '24 02:02 Aloxaf