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

Feature Request: Allow Option to Not Autocomplete on Enter #4799

Closed
Borthralla opened this issue Aug 27, 2018 · 5 comments
Closed

Feature Request: Allow Option to Not Autocomplete on Enter #4799

Borthralla opened this issue Aug 27, 2018 · 5 comments
Assignees
Labels

Comments

@Borthralla
Copy link

While I like autocomplete, it sometimes gets in the way. When I'm at the end of the line, I press enter as soon as I'm finished typing the last word. However, very often this inadvertently triggers the autocomplete which means I have to stop typing, drag my mouse up to the previous line, highlight the word, retype the original word, and then press escape and then enter, This takes way too long and is a serious interruption to my train of thought.

I tried to fix this by going into the scintilla shortcuts and changing sci_newline from enter to shift+enter. Although this fixed my autocomplete issue, it also had the unintended consequence of notepad++ interpreting enter as only carriage-return. Pressing enter no longer put a newline! That caused auto-indentation to fail and my code to be broken.

What's more, when I tried to remap sci_enter back to enter, I was unable to because enter was not a valid option. At that point I just uninstalled and reinstalled notepad++.

My suggestion: Add an option to not auto-complete on enter (just tab). Also, it probably would be a good idea to allow sci_enter to be bound to enter.

@endolith
Copy link

Yes this is super annoying when trying to create a newline. I use Ctrl-Z then Enter. For every newline that ends in a letter. How do people live with this??

No solution here either: https://superuser.com/q/1048224/13889

@calebjely
Copy link

Agreed, I have the same issue often. Autocomplete should only be triggered by TAB not ENTER.

@sasumner
Copy link
Contributor

How do people live with this??

We turn autocomplete OFF. Seriously, autocomplete is not usable in Notepad++.

@5j9
Copy link

5j9 commented Feb 20, 2020

https://superuser.com/a/1057259/340929 suggests that there might be a simple solution for this issue:

It can be fixed by removing the following three lines from src/ScintillaBase.cxx:

    case SCI_NEWLINE:
        AutoCompleteCompleted(0, SC_AC_NEWLINE);
        return 0;

@blaisemGH
Copy link

@Uhf7 proposed a sensible long-term solution for the standard distribution in this comment.

@donho donho self-assigned this Jan 8, 2022
@donho donho added the accepted label Jan 8, 2022
donho added a commit to donho/notepad-plus-plus that referenced this issue Jan 10, 2022
Auto-completion currently use both ENTER and TAB to insert the selected item,
in some circumstance people have to ENTER twice to have 1 newline feed.

in this commit, 2 options (ENTER & TAB) are given in Auto-completion settings,
so users can choose one of these 2 keystrokes (or both, or none).
By default ENTER is disabled and TAB is enabled.

Fix notepad-plus-plus#4799, fix notepad-plus-plus#4631, fix 8389, fix notepad-plus-plus#10915
@donho donho closed this as completed in 68d339d Jan 10, 2022
chcg pushed a commit to chcg/notepad-plus-plus that referenced this issue Jan 15, 2022
…ed item,

in some circumstance people have to ENTER twice to have 1 newline feed.

In this commit, 2 options (ENTER & TAB) are given in Auto-completion settings, so users can choose one of these 2 keystrokes (or both, or none). By default ENTER is disabled and TAB is enabled.
If auto-completion is disabled and completion is triggered manually, then the settings of ENTER & TAB won't be considered, both ENTER & TAB will be able to insert the selection.

Fix notepad-plus-plus#4799, fix notepad-plus-plus#4631, fix notepad-plus-plus#8389, fix notepad-plus-plus#10915, close notepad-plus-plus#11016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants