• Login
Community
  • Login

Windows .reg recognized, but no syntax highlighting?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 2 Posters 1.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y
    ytdlder
    last edited by Apr 11, 2019, 9:19 AM

    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!

    1 Reply Last reply Reply Quote 2
    • Y
      ytdlder
      last edited by Apr 11, 2019, 10:15 AM

      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)!!

      E 1 Reply Last reply Apr 11, 2019, 10:31 AM Reply Quote 1
      • E
        Ekopalypse @ytdlder
        last edited by Ekopalypse Apr 11, 2019, 10:31 AM Apr 11, 2019, 10:31 AM

        @ytdlder

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

        1 Reply Last reply Reply Quote 1
        • Y
          ytdlder
          last edited by Apr 11, 2019, 10:50 AM

          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?

          1 Reply Last reply Reply Quote 1
          1 out of 4
          • First post
            1/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors