Reputation: 5811
Is it possible for the auto formatter to line up code using certain characters in VS Code?
For example, turn this:
{
"one" : "one",
"two" : "two",
"three" : "three",
"four" : "four"
}
Into this:
{
"one" : "one",
"two" : "two",
"three" : "three",
"four" : "four"
}
Or this:
var one = "one";
var two = "two";
var three = "three";
var four = "four";
Into this:
var one = "one";
var two = "two";
var three = "three";
var four = "four";
Upvotes: 1
Views: 184
Reputation: 523
One way to accomplish this language-agnostically would be to use the Cursor Align extension, and use multiple cursors. To align a set of characters, you can select all occurrences of the selection (on Windows, the keyboard shortcut is Ctrl+Shift+L)
Upvotes: 1