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

Add a setting to change the script editor autocomplete shortcut (tab, enter, tab or enter) #1084

Closed
bchen32 opened this issue Jun 18, 2020 · 3 comments
Milestone

Comments

@bchen32
Copy link

bchen32 commented Jun 18, 2020

Describe the project you are working on:

This applies to all projects

Describe the problem or limitation you are having in your project:

Often times I will try to make a newline, and accidentally accept an autocomplete suggestion

Describe the feature / enhancement and how it helps to overcome the problem or limitation:

Allowing the user to change the shortcut to accept autcomplete can let them avoid this issue by setting it to tab only, or whatever other shortcut they are comfortable with, instead of enter or tab.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:

Adding an option for "autocomplete accept" to the shortcuts menu

If this enhancement will not be used often, can it be worked around with a few lines of script?:

No, it's built into the editor

Is there a reason why this should be core and not an add-on in the asset library?:

It's a core part of the editor

@Calinou
Copy link
Member

Calinou commented Jun 19, 2020

This should definitely be added. I'd prefer using only Tab to accept autocomplete suggestions myself.

@Calinou Calinou changed the title Allow Users to Change the Autocomplete Shortcut Add a setting to change the script editor autocomplete shortcut (tab, enter, tab or enter) Jun 19, 2020
@Calinou
Copy link
Member

Calinou commented Jun 20, 2020

For the record, this is currently hardcoded here:

https://github.com/godotengine/godot/blob/e773664f26ced3587a5a5d9caa494b96df00e3f4/scene/gui/text_edit.cpp#L2638

Since this isn't editor-specific code, we should avoid adding yet more editor-specific code to it. Therefore, this change will probably have to wait for the TextEdit refactor.

@Paulb23
Copy link
Member

Paulb23 commented Mar 7, 2021

@Paulb23 Paulb23 closed this as completed Mar 7, 2021
@Calinou Calinou added this to the 4.0 milestone Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants