是否有可能显示空白字符,像空格字符,在Visual Studio代码?
在设置中似乎没有这个选项。json(虽然它是Atom.io中的一个选项),我还不能使用CSS显示空白字符。
是否有可能显示空白字符,像空格字符,在Visual Studio代码?
在设置中似乎没有这个选项。json(虽然它是Atom.io中的一个选项),我还不能使用CSS显示空白字符。
当前回答
***更新2020年8月发布***见https://github.com/microsoft/vscode/pull/104310
“编辑器。renderWhitespace": " trails " //添加选项
Add a new option ('trailing') to editor.renderWhitespace that renders only
trailing whitespace (including lines with only whitespace).
***更新2020年2月发布***见https://github.com/microsoft/vscode/issues/90386
在v1.43中,默认值将像在v1.42中一样更改为从无选择。
"editor.renderWhitespace": "selection" // default in v1.43
v1.37更新:增加了只在选定文本中呈现空白的选项。参见v1.37版本说明,渲染空白。
编辑器。renderWhitespace设置现在支持选择选项。使用此选项集,空格将只在选定的文本上显示:
"editor.renderWhitespace": "selection"
and
"workbench.colorCustomizations": {
"editorWhitespace.foreground": "#fbff00"
}
其他回答
使空白可见的选项现在显示为视图菜单上的一个选项,如Visual Studio Code版本1.15.1中的“Toggle Render whitespace”。
只是为了演示编辑器的变化。renderWhitespace: none||boundary||all will do to your VSCode我添加了这张截图: .
其中Tab是→和Spaceare。
***更新2020年8月发布***见https://github.com/microsoft/vscode/pull/104310
“编辑器。renderWhitespace": " trails " //添加选项
Add a new option ('trailing') to editor.renderWhitespace that renders only
trailing whitespace (including lines with only whitespace).
***更新2020年2月发布***见https://github.com/microsoft/vscode/issues/90386
在v1.43中,默认值将像在v1.42中一样更改为从无选择。
"editor.renderWhitespace": "selection" // default in v1.43
v1.37更新:增加了只在选定文本中呈现空白的选项。参见v1.37版本说明,渲染空白。
编辑器。renderWhitespace设置现在支持选择选项。使用此选项集,空格将只在选定的文本上显示:
"editor.renderWhitespace": "selection"
and
"workbench.colorCustomizations": {
"editorWhitespace.foreground": "#fbff00"
}
更新(2022年12月) 对于最新版本的VSCode,您可以执行视图->外观->渲染空白。
打开用户首选项。键盘快捷键:CTR + SHIFT + P ->首选项:打开用户设置; 在搜索字段中插入空白,并选择所有参数