Changing file EOL with vscode extension API

Rus picture Rus · Sep 19, 2018 · Viewed 12.8k times · Source

Can I silently change end of line sequence in VSCode?
Something like this:

vscode.commands.executeCommand("workbench.action.editor.changeEOL", "LF");

Answer

Ali Radmanesh picture Ali Radmanesh · Nov 30, 2018

You can add this line to your user preferences settings (CTRL + ,):

"files.eol": "\n"