禁用引号环绕文本选择

禁用引号环绕文本选择

本文介绍了Visual Studio Code:禁用引号环绕文本选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我想从双引号变成单引号时,我习惯于选择双引号,然后输入单引号.我打算使用覆盖功能,但相反,我获得了用引号括起来"功能.

When I want to change from double quotes to single quotes, I'm used to selecting the double quote, and then type a single quote. I'm intending to use the overwrite feature, but instead, I'm getting the 'wrap with quote' feature.

例如:

"id"

会导致:

'"'id"

我总是关闭自动环绕,但我无法在设置文件中找到此设置...

I always turn this auto surround with wrapping off, but I was unable to find a setting for this in the settings file...

有没有办法关闭它?

推荐答案

这是可能的!

 "editor.autoClosingBrackets" : "never"

(位于 settings.json 中,您可以通过 File>Preferences>UserSettings 在编辑器中打开)

(Located in settings.json which you can open in Editor via File>Preferences>UserSettings)

遗憾的是,此设置涵盖了所有自动换行.包括大括号、双引号、单引号和方括号.您无法单独控制它们

Sadly this setting covers ALL auto wrappings. Including braces, double quotes, single quotes and brackets. You cannot control them individually

更新:autoClosingBrackets 已过时.新建议是:

"editor.autoSurround": "never"

这篇关于Visual Studio Code:禁用引号环绕文本选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 00:07