Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #27993
    J Melvin
    Participant

    Is there a way to make registry key header entries toggle to a different color when they are marked for deletion

    Example
    [HKEY_CURRENT_USER\SOFTWARE\EmSoft\EmEditor v3]<<<<<<<<<<<< Default *.ini syntax color, fine)
    [-HKEY_CURRENT_USER\SOFTWARE\EmSoft] <<<<<<<<<<<< Want different color when bracket is marked for deletion with the minus sign “-” after the leading bracket

    Thanks for your help.

    #27995
    LTT
    Participant

    You can add a string in Highlight(1):
    [-
    ▲ Enable “Highlight Right Side” (or “Highlight Right All”) for it.
    ▲ Choose a color for it.

    Or add this:
    ^\[-
    ▲ Enable “Regular Expression” for it.
    ▲ Enable “Highlight Right Side” (or “Highlight Right All”) for it.
    ▲ Choose a color for it.

    #27997
    J Melvin
    Participant

    @LTT. I had already tried your first suggestion but it didn’t work, I guess because it conflicts with the normal string I had defined for [. Your suggested regular expression didn’t work either until I also defined a regular expression for the normal bracket ^\[. So now I have a regular expression of ^\[- for disabled key and ^\[ for enabled key and everything works fine. Just offering this detailed explanation in case someone else runs into the same issue. Thanks again.

    #28003
    LTT
    Participant

    The draw order seems complicated.
    I have to set it this way:
    picshack.net/ib/Ogai299qED.png

    @Yutaka

    Default settings.
    Highlight(1):
    Switch to “Both User-Defined Strings and Default Keywords”.
    Add the 2 items as shown in the above image.

    ** I couldn’t get them work, till I switched to “Only User-Defined Strings”.

    ** If I use 2 non-regex items instead ( “[” and “[-” ), only “[” works in “Only User-Defined Strings”, no matter what the order is.

    I got dizzy on this…
    Please add a description in the help about the draw order/rules used in Highlight(1), e.g.:
    Default keywords vs User-defined strings
    Regex vs Non-regex
    The sort order

    #28004
    LTT
    Participant

    @YEMURA
    It’s “ini” configuration.

    #28005
    J Melvin
    Participant

    @LTT. Yes, that is exactly the way I have it set now, just like your screen shot. But as I said, when I mixed a regex definition with a non-regex user defined bracket, there’s some sort of conflict and it won’t work, at least in my configuration where I am only useing User-Defined Strings. Hope that clarifies things.

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