Bug 475466 - Key to confirm suggestion
Summary: Key to confirm suggestion
Status: REPORTED
Alias: None
Product: kate
Classification: Applications
Component: part (show other bugs)
Version: 23.08.1
Platform: Other Other
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-11 13:46 UTC by Matthias
Modified: 2023-12-18 19:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Idea for the implementation (138.17 KB, image/png)
2023-10-11 13:46 UTC, Matthias
Details
Conflict with this setting (127.69 KB, image/png)
2023-10-11 13:51 UTC, Matthias
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias 2023-10-11 13:46:05 UTC
Created attachment 162220 [details]
Idea for the implementation

SUMMARY

I like to insert the suggested value of auto-completion with tab, and not with Enter. 
Please see the attached screenshot, to see how this could look like.  

The current approach allows only to disable autocompletion at all or to disable the preselection of the first suggestion. 
Other than that, is there no way, to not have the enter key insert suggestions, when I actually just want to insert a newline. 

Other editors, like VSCode, already support this.
Comment 1 Matthias 2023-10-11 13:50:44 UTC
In case we implement that, be aware that it conflicts with the setting "Cycle through the results with tab/shift+tab"

Two possible ways to solve that could be:

a) Make the key(s) to cycle through the results customizable as well
b) Disable this setting, if the other setting is enabled and vice versa
Comment 2 Matthias 2023-10-11 13:51:17 UTC
Created attachment 162221 [details]
Conflict with this setting
Comment 3 Waqar Ahmed 2023-10-11 14:22:24 UTC
You can press Ctrl+Enter to insert a newline
Comment 4 Matthias 2023-10-11 14:53:12 UTC
Yeah, I would rather use Ctrl+Enter to accept the suggestion. 
Ctrl+Enter is very unnatural to me for entering a newline, since Kate would be the only program that does so. 
All other programs that let my edit text, enter a newline. 
As this field in bugzilla :D
Comment 5 Waqar Ahmed 2023-10-11 15:12:34 UTC
Its not unnatural for an advanced text editor made for programming when in the context of autocompletion. We also have ctrl+shift+enter/ctrl+alt+enter. Perhaps you should use kwrite, it might not have this issue.

In any case, it's simple to implement such a setting so can be a good first task.
Comment 6 Matthias 2023-10-11 19:52:35 UTC
Thanks a lot. 

I very much use Kate as an IDE.
Comment 7 Christoph Cullmann 2023-12-18 19:16:22 UTC
Is an valid wish, if somebody has time, please provide some merge request: https://kate-editor.org/join-us/