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)'}
];
I get this -
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?
Save without Formatting Selecting it in the command palette: CTRL + SHIFT + P. Doing the keyboard shortcut: CTRL + K , S.
When saving, Visual Studio inserted a lot of spaces. This happened after an update of Visual Studio. This problem was because of an extension called Bracket Pair Colorizer .
The code formatting is available in Visual Studio Code through the following shortcuts: On Windows Shift + Alt + F. On Mac Shift + Option + F. On Linux Ctrl + Shift + I.
Sorry, but the formatting options are currently not exposed to the user. It is high on our backlog.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With