Why does VS add a blank line at the end of each new file I create? I use VS to create .NET projects (not C++ or something).
Is there any special reason? Historical compatibility with compilers and parsers?
Can I disable this??
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is recommended to have a blank line at the end of each file for navigability purposes. Think what happens if someone opens your code with vim for example and uses a keymap to jump from empty line to empty line. Or, if he decides to add another portion of code at the end of file he can quickly do a GO and enter it instead of having to scroll until the end of file.
Also, source control tools will report more changes if you don’t have a trailing blank line when you try to insert code at the end of file.