Skip to content

Instantly share code, notes, and snippets.

@jyydev
Last active June 29, 2021 11:26
Show Gist options
  • Save jyydev/e1ba1a98074b41ec40547a25a7637c98 to your computer and use it in GitHub Desktop.
Save jyydev/e1ba1a98074b41ec40547a25a7637c98 to your computer and use it in GitHub Desktop.
VSCode -> autocomplete -> disable, turn off autocomplete on enter, return

Disable (turn off) autocomplete on enter, return key for VSCode

Some people do not want to autocomplete when they enter.

They will choose tab key instead since you have to press esc when you want to use enter key and at the same the unwanted suggestion shows up.

But some people find enter key is more handy instead.

Anyway, below shows 2 ways to turn this off.

Method 1:

  1. Go to VSCode setting and search for:
editor.acceptSuggestionOnEnter
  1. Choose off from the dropdown menu below:
Editor: Accept Suggestion On Enter
Controls whether suggestions should be accepted on Enter, in addition to Tab. Helps to avoid ambiguity between inserting new lines or accepting suggestions.
[off]

Method 2:

Place this in your 'settings.json' file :

"editor.acceptSuggestionOnEnter": "off",

settings.json can be found and opened by:

  1. Opening the setting of VSCode.
  2. On top right corner icons, the first icon is the settings.json file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment