2

I don't like most auto-completion of parentheses/quotes in VS Code, but I would like to have braces auto completed. That is, if I type:

function foo(thing) {

I would like to get the following (where | is the cursor):

function foo(thing) {
   |
}

And similarly for if etc.

Is there a way to achieve this in VS Code?

3
  • 1
    BYOP - Build Your Own Plugin Commented Dec 8, 2021 at 1:39
  • Hoping for an existing solution. Commented Dec 8, 2021 at 1:52
  • write a few snippets for function and if Commented Dec 8, 2021 at 12:12

1 Answer 1

1

It's a build in feature.

  1. Click Manage icon on the bottom left corner -> Settings

enter image description here

  1. Clear Search Settings

  2. Click User Tab-> Text Editor->

Auto Closing Bracklets -> Always

Auto Closing Quotes -> Never

enter image description here

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

1 Comment

That has two problems compared to what I specified in the question. It also applies for parentheses (which I don't want), and it doesn't add the line breaks (which I do want).

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.