Windows .reg recognized, but no syntax highlighting?



  • Hi!

    I’m not sure if this is a bug or whatnot, but I’m sure that it worked before.

    The thing is that Notepad recognized those files as “Registry” language, and there is a definition for that in the “%appdata%\notepad++\stylers.xml”:

        <LexerType name="registry" desc="registry" ext="">
            <WordsStyle name="DEFAULT STYLE" styleID="32" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="DEFAULT" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="COMMENT" styleID="1" fgColor="007F00" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="VALUE NAME" styleID="2" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="STRING" styleID="3" fgColor="7F007F" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="HEX DIGIT" styleID="4" fgColor="7F0B0C" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="VALUE TYPE" styleID="5" fgColor="00007F" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
            <WordsStyle name="ADDED KEY" styleID="6" fgColor="530155" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="REMOVED KEY" styleID="7" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="ESCAPED CHARACTERS IN STRINGS" styleID="8" fgColor="7D8187" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
            <WordsStyle name="GUID IN KEY PATH" styleID="9" fgColor="7B5F15" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="GUID IN STRING" styleID="10" fgColor="7B5F15" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="PARAMETER" styleID="11" fgColor="0B6561" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="OPERATORS" styleID="12" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
        </LexerType>
    

    But there is no highlighting what so ever!

    I’m not proficient with this xml, so I don’t know if “Registry” is actually used for a different file format and that’s why highlighting doesn’t work as there is no definition found (like comments).

    Hopefully someone can figure this out and/or post his “registry” or a new “.reg” definition for proper Windows Registry File syntax highlighting!

    Thank you very much and cheers!



  • Ok, a quick update:
    I just tried the “Style Configurator” and there seems to be no entry for “Registry”!?

    Btw.: this is a NEW n++ install (v7.6.6 x86)!!



  • @ytdlder

    I’ve downloaded the x86 portable version and it seems to be there.
    Would you mind sharing your debug info?



  • Ok, I got it to work; I just asked a friend to try this…

    The “problem” is, that there is no “Registry” style; at least visible in the UI, as it IS in the XML. The same is true with my friend -> the .reg highlighting works for him, because N++ recognizes them as “.ini” ;-)

    Anyway, the solution for now (for me at least):
    o) open the Style Configurator
    o) change ANY color for any language and SAVE
    o) optionally(?) restart N++
    o) now “Registry” is visible in the Style Configurator & the highlighting works!!


    further info: when comparing the “default” stylers.xml with the newly Notepad++ saved one, then there are several differences throughout the .xml
    -> maybe it’s “damaged” somewhere?


Log in to reply