Like so many people, you seem to mix up "new line" and "newline".
When editing a file where the last line doesn't end with a "newline" character, Vim will add that "newline" character on write unless the 'noeol'
and 'binary'
option are set. So, basically, you probably always have that "newline" character at the end of your files, whether you see it or not.
The "newline" character can be interpreted in two ways:
- as a "line terminator", the editor considers anything that comes after a "newline" character to be on another line;
- as a "line separator", the editor considers that the "newline" character must be between two lines.
In the first interpretation, that "newline" character at the end of the last line can't really be displayed in any useful way because it is the same as any other "newline" character at the end of any other line in the file. If you think about it, there's no real need to even display it.
In the second interpretation, that "newline" character at the end of the last line is not displayed either but, because the interpretation mandates the presence of another line after the "newline" character, the editor adds a "new line" at the end of the file.
Adding such a "new line" at the end of the file just as misleading as it is unnecessary and wrong.
The Vim way is simply to assume the "newline" character is there and thus to not add an unnecessary "new line" at the end of the file.