'Visual Studio Code — Insert Newline at the End of Files
When saving a file using Visual Studio Code, a newline is not automatically added to the end of the file, causing all sorts of potential issues.
How does one append a newline automatically in Visual Studio Code?
Solution 1:[1]
I have placed a screen capture below showing how to make Visual Studio Code insert a newline at the end of files. This will also serve as a useful place to link to in code reviews when saying "You need to do this and resubmit".
Solution 2:[2]
While editing PHP files, something was deleting the newline at the end of the file. In my case it turned out to be the HTML format (html.format.endWithNewline), I believe because of the Emmet extension. (see attached images)
Solution 3:[3]
The error occurred because you have .ovpn files in your global or local config directory.
It can be solved in the following ways. OpenVPN stores the configuration in 2 places:
Global Directory: C:\Program Files\OpenVPN\config
User's Directory: C:\Users[YOUR_USERNAME]\OpenVPN\config
So, firstly delete the .ovpn configuration file from both folders. Then, copy the VPN configuration file to "C:\Program Files\OpenVPN\config" and rerun the OpenVPN
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | LJH |
| Solution 2 | Telmo Dias |
| Solution 3 | Nikhil Dwa |



