Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5918
    suli2921
    Member

    I want to save all open files in LF Only (UNIX) return method. here’s my code:

    For Each doc In editor.Documents
    doc.encoding = eeEncodingUTF8
    doc.UnicodeSignature = False
    doc.newline = ?
    Next

    what’s the value for LF Only (UNIX)?

    #5920
    Yutaka Emura
    Keymaster

    suli2921 wrote:
    I want to save all open files in LF Only (UNIX) return method. here’s my code:

    For Each doc In editor.Documents
    doc.encoding = eeEncodingUTF8
    doc.UnicodeSignature = False
    doc.newline = ?
    Next

    what’s the value for LF Only (UNIX)?

    You will need to use “Save Returns as LF only” command, so you will need to activate each document, and then use
    editor.ExecuteCommandByID(4107);

    #5924
    suli2921
    Member

    Thank you, this is very helpful.

    For Each doc In editor.Documents
    doc.encoding = eeEncodingUTF8
    doc.UnicodeSignature = False
    editor.ExecuteCommandByID 4107
    Next

    #5925
    Yutaka Emura
    Keymaster

    suli2921 wrote:
    Thank you, this is very helpful.

    For Each doc In editor.Documents
    doc.encoding = eeEncodingUTF8
    doc.UnicodeSignature = False
    editor.ExecuteCommandByID 4107
    Next

    But you have to activate each document first.


    For Each doc In editor.Documents
    doc.Activate
    doc.encoding = eeEncodingUTF8
    doc.UnicodeSignature = False
    editor.ExecuteCommandByID 4107
    Next

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.