-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
How to let `ivy-partial-or-done' only complete and do not open file or directory? #86
Comments
Just bind (define-key ivy-minibuffer-map (kbd "TAB") 'ivy-partial) |
Thanks! |
I try, but feel confusion, following code seed more comfort
|
I also find the follow configure is also a comfort tip:
|
Hi, sorry for necropumping this thread, but it is very related I am trying this: and the behaviour is ALMOST what I wanted. BUT the candidates list is not shown if I press tab many times, it requires to press C-j to be shown. Basically I want this to behave like bash or zsh completion because it is more intuitive I think. What is missing now it the candidates list with the second tab press, because it does nothing. I don't want to bother too much, but I don't know if this is the expected behaviour or an issue, maybe it is something I can configure or it requires more complicated work?? Any help please? |
What do you think should happen with the second tab press? The candidates list is already shown and there's nothing further to complete. If you really see a use case improvement, please open a new issue and describe a detailed scenario of how you think it should work. |
@Ergus OK, I see now. The intended design of Instead, the default biding of TAB is |
Yes, I know. But what I want is to avoid tab to open a file or dired if the completion is actually in a file or directory. ivy-partial-or-done does what I want, but a wrong extra tab makes too much. |
Hi abo-abo: If the function ivy--directory-done substitutes the 2 calls to (ivy-done) with an "alias" function (initialized by default to ivy-done); then we can reassign the alias symbol in the configuration but the default behaviour will not change. We can just reassign the alias to nothing and the behaviour will be like bash; or to something else for advanced users. Does it makes sense? |
* ivy-test.el (ivy-partial-files): Add test. Re #86
@Ergus Please have a look at the change. If there are more changes required, please open a new issue. |
Now it is perfect. Thank you very much! |
@Ergus thanks for your reply. I think I had already tried this configuration. But trying it again, lets me realize that the way I'd like to use completion in Ivy is not exactly the same as bash but a mix between bash and default Ivy behavior : TAB only for completion (after entering a character or navigating with up or down arrows), ENTER only for opening file or directory. If someone succeeds in configuring a similar behavior in Ivy, please let me know. In the meantime, I'll give a try to @Ergus configuration, and who knows, maybe even adopt it ! |
I want to use TAB to complete directory or file name, but don't open, is it possible?
The text was updated successfully, but these errors were encountered: