As far as I'm concerned, there are the following options when it comes to the "final newline" in a file (considering only Unix-style line endings and disregarding Classic MacOS and DOS, for now):
first line\n
last line
first line\n
last line\n
first line\n
last line, except not really\n
\n
Which ones of these exactly are achieved by setting insert_final_newline
to true
and false
, respectively, in .editorconfig
?
if setting insert_final_newline to true:
Fix this A whole final new line:
if setting insert_final_newline to false:
No final newline character:
first line\n
last line
Sorry, let me make one correction!
if setting insert_final_newline to true:
Newline character at the end of the last line:
first line\n
last line\n
Original text:
Hex shows the following, 0D0A
is \r\n