7

Is there any way to disable enter as auto-complete key? I like autocomplete to be switched on for words, but there are times, when I need to new line while auto-complete is showing.

I'd like auto-complete to just trigger on tab for that reason. It's kinda more than average annoyance for me.

There is a similarly-looking question, but it is not similar.

6

In Settings -> Shortcut mapper -> Scintilla commands

Double click SCI_NEWLINE (should be item 9 in the list), select Enter and remove it.

------ EDIT -------

Note that you can't add Enter back after removing it in Notepad++. One way to add it back is open %appdata%\Notepad++\shortcuts.xml file, and change following lines:

<ScintillaKeys>
    <ScintKey ScintID="2329" menuCmdID="0" Ctrl="no" Alt="no" Shift="yes" Key="13" />
</ScintillaKeys>

to following:

<ScintillaKeys/>

save file and restarte NotePad++, and the setting should be restored.

| improve this answer | |
  • 2
    Hey! I did that and now Notepad++ does not auto-indent for me. I cannot re-add the Enter shortcut so now I'm screwed X.X Please tell me what to do. – Foxcat385 Nov 28 '16 at 21:01
  • @Foxcat385 updated my answer for how to add back Enter shortcut. – Deqing Dec 6 '16 at 0:26
  • You can't use <kbd>right</kbd> because there's a conflict, but it's a different situation; so, you should be able to use <kbd>right</kbd>. – Wolfpack'08 Apr 26 at 7:46
1

I don't know how to disable it, but a workaround would be to hit Esc before Enter to close the suggestion pop-up in that special situation where you want to insert a new line instead of auto-completing.

| improve this answer | |
0

According to the related Github issue, there is nothing you can do in Notepad++ to prevent this. It would have to be changed in Scintilla itself.

I've resorted to an AutoHotkey script to replace Enter with Esc + Enter while in Notepad++:

#IfWinActive, ahk_class Notepad++
Enter::SendInput {Esc}{Enter}

This appears to work perfectly so far. Any menus/dialogs opened by Notepad++ have a different ahk_class, so this script won't send Esc+Enter when you just want to e.g. confirm a dialog with Enter.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.