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

[Q] Is it possible to use continuous-trigger with TAB and ENTER? #338

Open
pablospe opened this issue Dec 25, 2022 · 5 comments
Open

[Q] Is it possible to use continuous-trigger with TAB and ENTER? #338

pablospe opened this issue Dec 25, 2022 · 5 comments
Labels
question Further information is requested

Comments

@pablospe
Copy link

I would like to accept the selection with TAB (and ENTER), and then continue with the next completion, as it would happened with / keybinding (if continuous-trigger is set on).

I have tried the following without success:

zstyle ':fzf-tab:*' continuous-trigger '\e'
@pablospe pablospe added the question Further information is requested label Dec 25, 2022
@Schievel1
Copy link

Schievel1 commented Jan 27, 2023

Is it possible to do accept the completion using TAB?
// with zstyle ':fzf-tab:complete:*' fzf-bindings 'tab:accept'

@pablospe
Copy link
Author

Thanks for the reply, I ended up using:
zstyle ':fzf-tab:*' continuous-trigger 'ctrl-e'

for ENTER it would be:
zstyle ':fzf-tab:*' continuous-trigger 'enter'

and with TAB:
zstyle ':fzf-tab:*' continuous-trigger 'tab'

But this is not the behaviour I wanted, reason why I am using another shortcut (Ctrl-e).

@pablospe pablospe changed the title [Q] Is it possible to use continuous-trigger with TAB or ENTER? [Q] Is it possible to use continuous-trigger with TAB and ENTER? Feb 1, 2023
@pablospe
Copy link
Author

pablospe commented Feb 1, 2023

Is there a way to have multiple of bindings for the same action?

zstyle ':fzf-tab:*' continuous-trigger 'ctrl-e'
zstyle ':fzf-tab:*' continuous-trigger 'enter'

It will only work keep the last one.

@pablospe pablospe reopened this Feb 1, 2023
@pablospe
Copy link
Author

@Aloxaf One question here. If I use:
zstyle ':fzf-tab:*' continuous-trigger 'enter'
Is there a way to stop the continuous-triggering once that one element was selected?

I mean, if I do

vi <TAB>

and there are

a/b/c.txt
a/b/d.txt

I would like to go to c.txt file while pressing enters (showing me the options without pressing tab again, which it is the continuous-trigger), but once I arrive to one of the files like c.txt, I would like to stop the continuous-trigger. I always have to do <ESC> or <alt+enter> to finish the continuous-trigger, which it is not intuitive.

@pablospe
Copy link
Author

pablospe commented Oct 10, 2024

For context, I am using: zstyle ':fzf-tab:complete:(vi|vim|l|ls|code):*' fzf-preview 'less ${(Q)realpath}'.

Note: I don't observe this behavior if I do cd \<TAB\>, which makes me think the previous line has something to do with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants