DEV Community

Discussion on: How to Get Consistent Line Breaks in VS Code (LF vs CRLF)

Collapse
 
jacobdb profile image
Jacob Bearce

Would be nice if there was an option to automatically change existing files too, drives me nuts having to constantly fix it when dealing with Windows files...

Collapse
 
joelbonetr profile image
JoelBonetR 🥇

using linux or WSL2 on windows you can simply use the dos2unix to bulk change that for the entire project :)

Collapse
 
jacobdb profile image
Jacob Bearce

That's a good idea, thanks! Not quite as convenient as it doing it automatically, but I can probably just alias code to do dos2unix first automatically

Thread Thread
 
joelbonetr profile image
JoelBonetR 🥇

God please no. Simply configure your VSCode to use LF first, then run the dos2unix command recursively only once to edit the current files.

All edits and new files should be LF after that.

Collapse
 
ouzkagan profile image
ouzkagan