vscode extension split line into multiple lines
MIT License
split one line into multiple lines by custom separator (default: ',')
warning:
this extension will append '\n'
to separator in the outermost layer,
for example: [1,], [2,], [3,]
will split into [1,],\n [2,],\n [3,]
,
but [[1,], [2,], [3,]]
won't split.
so don't select the outermost brackets
split line
ctrl + cmd + s
in mac or ctrl + alt + s
in win, (use default separator, ',')ctrl + cmd + x
in mac or ctrl + alt + x
in win, (use default separator, ',' , break line in start and end of selected string (breakStartEnd: true
))"extension.splitLine"
to change default separator in args
separator: string
, breakStartEnd: boolean
, breakBeforeSeparator: boolean
example: you can set hotkey in vscode keybindings.json
like this:
{
"key": "ctrl+cmd+x",
"command": "extension.splitLine",
"when": "editorTextFocus && !editorReadonly",
"args": {
"separator": " ",
"breakStartEnd": true,
"breakBeforeSeparator": false
}
}