Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #8054
    KamilZ
    Participant

    It’s possible show or hide all special visualization characters (tabs, space, cr, crlf, eof etc..) via “one toolbar button” ?

    #8056
    MariaK
    Participant

    Yes, but only with a macro; example:

    #icon = “Buttons.icl”,13
    #title = “Show Marks”
    #tooltip = “Show Marks”

    // Displays or Hides Marks.

    myobject = document.Config;

    if (myobject.Mark.ShowReturns==0 && myobject.Mark.ShowEOF==0 && myobject.Mark.ShowTabs==0 && myobject.Mark.ShowSpaces==0 && ShowDBSpaces==0 && CrLfDifferent==0 && ShowIndentGuides==0 && myobject.Mark.ShowControlCharacters==0) {
    myobject.Mark.ShowReturns=”true”; // Returns
    myobject.Mark.ShowEOF=”true”; // End of File
    myobject.Mark.ShowTabs=”true”; // Tabs
    myobject.Mark.ShowSpaces=”true”; // Spaces
    myobject.Mark.ShowDBSpaces=”true”; // Wide Spaces
    myobject.Mark.CrLfDifferent=”true”; // CR and LF with Different Marks
    myobject.Mark.ShowIndentGuides=”true”; // Indent Guides
    myobject.Mark.ShowControlCharacters=”true”; // Control Characters
    }
    else {
    myobject.Mark.ShowReturns=”false”; // Returns
    myobject.Mark.ShowEOF=”false”; // End of File
    myobject.Mark.ShowTabs=”false”; // Tabs
    myobject.Mark.ShowSpaces=”false”; // Spaces
    myobject.Mark.ShowDBSpaces=”false”; // Wide Spaces
    myobject.Mark.CrLfDifferent=”false”; // CR and LF with Different Marks
    myobject.Mark.ShowIndentGuides=”false”; // Indent Guides
    myobject.Mark.ShowControlCharacters=”false”; // Control Characters
    }

    myobject.Save();

    #8060
    KamilZ
    Participant

    Thank you !!

    #10920
    Stefan
    Participant

     
     
    Toggle ALL marks at once (Space Tabs EOL EOF)

    Often i want to see more then one kind of mark (Space, Tab, Line ends, End of file)

    and therefor i have to go three/four times to the menu “View > Marks”
    to enable or disable only one mark kind at each visit.

    I had created an macro for this too

    But I want to suggest to add an menu item
    “View > Marks > Toggle Marks Visibility

     

    #11123
    Andreas
    Participant

    This is very useful. Thanks, MariaK.

    But it’s a pity that a macro is needed for this. It would be better if this were the default behavior of the toolbar button “Marks”.

    #17874
    ArthurZ
    Participant

    I am using EmEditor 14.2.1
    and get an error using the macro above:

    Error 'ShowDBSpaces' is undefined

    #17876
    Andreas
    Participant

    The following version of the macro does work:

    #title = “Marks”
    #tooltip = “Toggle Marks ON/OFF”

    // Displays or Hides Marks.

    myobject = document.Config;

    if (myobject.Mark.ShowReturns==0 && myobject.Mark.ShowEOF==0 && myobject.Mark.ShowTabs==0 && myobject.Mark.ShowSpaces==0 && myobject.Mark.ShowDBSpaces==0 && myobject.Mark.CrLfDifferent==0 && myobject.Mark.ShowIndentGuides==0 && myobject.Mark.ShowControlCharacters==0) {
    myobject.Mark.ShowReturns=”true”; // Returns
    myobject.Mark.ShowEOF=”true”; // End of File
    myobject.Mark.ShowTabs=”true”; // Tabs
    myobject.Mark.ShowSpaces=”true”; // Spaces
    myobject.Mark.ShowDBSpaces=”true”; // Wide Spaces
    myobject.Mark.CrLfDifferent=”true”; // CR and LF with Different Marks
    myobject.Mark.ShowIndentGuides=”false”; // Indent Guides
    myobject.Mark.ShowControlCharacters=”true”; // Control Characters
    }
    else {
    myobject.Mark.ShowReturns=”false”; // Returns
    myobject.Mark.ShowEOF=”false”; // End of File
    myobject.Mark.ShowTabs=”false”; // Tabs
    myobject.Mark.ShowSpaces=”false”; // Spaces
    myobject.Mark.ShowDBSpaces=”false”; // Wide Spaces
    myobject.Mark.CrLfDifferent=”false”; // CR and LF with Different Marks
    myobject.Mark.ShowIndentGuides=”false”; // Indent Guides
    myobject.Mark.ShowControlCharacters=”false”; // Control Characters
    }

    myobject.Save();

    Note that I changed the handling of the Indent Guides, because I never want to see them.

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