Indent Code
Shared by @ctietze
Indents the selected text by 4 spaces
Script
const text = editor.getSelectedText();
var lines = text.split("\n");
lines = lines.map(function(l) {
return ' '+l;
});
editor.replaceSelection(lines.join("\n"));
Shared by @ctietze
Indents the selected text by 4 spaces
const text = editor.getSelectedText();
var lines = text.split("\n");
lines = lines.map(function(l) {
return ' '+l;
});
editor.replaceSelection(lines.join("\n"));