Automatically ending a file with a line feed?

Automatically ending a file with a line feed?

601
Advanced UserAdvanced User
601

    Jun 12, 2008#1

    Hi everyone. Is there a setting somewhere that automatically inserts an LF on the last line of a file when you save it? I can't seem to find anything like that.

    Thanks,
    John

    262
    MasterMaster
    262

      Jun 12, 2008#2

      Not as far as I know, but how about setting a macro to do the job in Macro - Set macro for file load/save ?

      6,688586
      Grand MasterGrand Master
      6,688586

        Jun 12, 2008#3

        And here is the macro code which could be executed on every file save. But it works only if you normally don't use bookmarks. The bookmark is used to set the cursor back to current position on file save after checking the line termination of the last line.

        ToggleBookmark
        Bottom
        IfColNumGt 1
        InsertLine
        IfColNumGt 1
        DeleteToStartofLine
        EndIf
        EndIf
        GotoBookMark -1
        ToggleBookmark
        Best regards from an UC/UE/UES for Windows user from Austria