Reputation: 2247
I am looking for vscode API call for inserting newline respecting the indentation
Something like this...
vscode.commands.executeCommand("cursorDown");
// this just puts the cursor in the next line
Upvotes: 0
Views: 606
Reputation: 11692
You can use the editor.action.insertLineAfter
command. I tried it with the command palette using vscode 1.22.2 and it does what your gif shows.
Upvotes: 2