1. Install the Prettier plug-in
Prettier - Code formatter
2. Configure the following in the setting.json configuration
(Recommended learning video tutorial: java video tutorial)
"prettier.useEditorConfig": false, "prettier.semi": true, // 是否带分号 "prettier.singleQuote": true // 是否为单引号
3. Use vscode’s own formatting
Alt Shift F
Recommended tutorial: vscode tutorial
The above is the detailed content of How to automatically add double quotes in vscode. For more information, please follow other related articles on the PHP Chinese website!