Trouble with End of Line Characters
Use code-eol Extension to see EOLN in VS Code
When working on both windows and linux, it is sometimes useful to see the end of line characters in a file. This can be done with the following extension in vscode. This affects the running of all text files including shell scripts and is hard to diagnose if you are not aware of it. The extension is called “code-eol” and is by sohamkamani. It is available in the vscode marketplace.
If you open a text file, you will see either LF or CRLF in the bottom right hand corner of the window. This is useful when you are working on a file that is shared between windows and linux. Simply click on this to convert the file to the other format.
Set EOLN Permanently in VS Code
You can find the Eol option in Visual Studio Code settings. It’s under “Text Editor”→”Files”→”Eol”. Here you can select whether you want \n or \r\ … as your end of line character.
Brian