如何告诉 VS Code 中的自动格式在打开和关闭花括号之前不要插入空格? [英] How to tell auto-format in VS Code not to insert spaces after opening and before closing curly braces?

查看:49
本文介绍了如何告诉 VS Code 中的自动格式在打开和关闭花括号之前不要插入空格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我在 Visual Studio Code 中使用自动格式化快捷方式 (Shift + Alt + k) 时在包含这段代码的文件中 -

Whenever I use the auto-format shortcut (Shift + Alt + k) in Visual Studio Code inside a file that contains this piece of code -

var keyframes = [
  {opacity: 0, transform: 'translate(0, 4em)'},
  {opacity: 1, transform: 'translate(0)'}
];

我明白了 -

var keyframes = [
  { opacity: 0, transform: 'translate(0, 4em)' },
  { opacity: 1, transform: 'translate(0)' }
];

我想知道是否有任何方法可以告诉自动格式插入所有空格?

I wonder if there's any way to tell the auto-format not to insert all the spaces?

推荐答案

抱歉,格式选项目前未向用户公开.我们的积压工作量很大.

Sorry, but the formatting options are currently not exposed to the user. It is high on our backlog.

这篇关于如何告诉 VS Code 中的自动格式在打开和关闭花括号之前不要插入空格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆