5

Sometimes when I press the Enter button, VSCode will aggressively complete the code which I don't want.

For example:

When I type in the

import numpy as np

and press the enter, VSCode will change the np to numpy

or when I type in the

else

and press the enter, VSCode will change it to

else
{
    /*...*/
}

while I sometimes really don't need this format.

So how can I disable 'Enter' for code snippet and use Tab only?

1 Answer 1

6

You can achieve this by going to your settings and search for Accept Suggestion On Enter in the search bar. Simply toggle it to off and this should solve your problem.enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

The same thing happens when I fill the placeholder of a snippet with a value that triggers another snippet upon pressing tab. How can this be avoided?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.