Sublime Text: Add NewLine at EOF on Save

Each line should be terminated in a newline character, including the last one.

3.206 Line
A sequence of zero or more non- <newline> characters plus a terminating <newline> character.

A Sublime Text can be configured to add a newline character automatically on a file save, using the ensure_newline_at_eof_on_save option (false by default).

Cool Tip: How to install package (plugin) in Sublime Text! Read more →

Add NewLine at EOF on Save in Sublime Text

Go to the Preferences -> Settings in Sublime Text and in the right panel set the ensure_newline_at_eof_on_save to true:

    // Set to true to ensure the last line of the file ends in a newline
    // character when saving
    "ensure_newline_at_eof_on_save": true

Now on each Save in the Sublime Text, a newline at the end of a file (EOF) will be added automatically.