简体   繁体   English

VS Code 中的自动完成 JavaScript 大括号

[英]Auto-complete JavaScript braces in VS Code

I don't like most auto-completion of parentheses/quotes in VS Code, but I would like to have braces auto completed.我不喜欢 VS Code 中括号/引号的大多数自动完成,但我希望大括号自动完成。 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.同样对于if等。

Is there a way to achieve this in VS Code?有没有办法在 VS Code 中实现这一点?

It's a build in feature.这是一个内置功能。

  1. Click Manage icon on the bottom left corner -> Settings单击左下角的管理图标 -> 设置

在此处输入图像描述

  1. Clear Search Settings清除搜索设置

  2. Click User Tab-> Text Editor->单击用户选项卡-> 文本编辑器->

Auto Closing Bracklets -> Always自动关闭括号 -> 始终

Auto Closing Quotes -> Never自动收盘价 -> 从不

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM