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

Please allow the autocomplete popup box to execute the first suggestion with an "ret" press #5343

Closed
effinsky opened this issue Dec 30, 2022 · 4 comments
Labels
C-enhancement Category: Improvements

Comments

@effinsky
Copy link

Hello -- seems like a simple quality of life change for those who, like I, are used to going up and down popups with j and k or and and accepting options with a press of "ret". This goes for navigating menus in general but I have personally found it a bit jarring to be unable to do this. If possible, please add :)

@effinsky effinsky added the C-enhancement Category: Improvements label Dec 30, 2022
@the-mikedavis
Copy link
Member

This behavior was removed in #1704. If ret accepts the first item in the completion menu, you can't insert newlines while the completion menu is open. This makes editing very unpredictable for some languages.

I think the ideal way to fix this might be to allow menu keybindings to be configurable.

@effinsky
Copy link
Author

Absolutely -- I wouldn't say even make this default if folks don't want that. Perhaps just include a config option. In my bvim cmp opt I just have this little bit. Never had trouble with this combination:

Screenshot 2022-12-30 at 19 28 13

@mnpqraven
Copy link

I second this, having a way to automatically choose the first autocomplete option would be a great boon to people who were already using that function in neovim. But if ret becomes problematic as a default, how about enabling picker commands as normal commands so people can bind them in the config for example:

[key.insert]
C-o = ["next_entry", "select_entry"]

This way you would be able to select the first autocomplete when hitting Ctrl O

@pascalkuthe
Copy link
Member

We actually went the other way here. You can select the first item by just hitting tab once (or c-n) at that point you can just keep typing.

I don't see us adding a soecical config flag or similar. If you want a different mapping you have to wait for #5505

@pascalkuthe pascalkuthe closed this as not planned Won't fix, can't repro, duplicate, stale Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

4 participants