Community
    • Login

    Windows .reg recognized, but no syntax highlighting?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 1.5k Views 1 Watching
    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.
    • ytdlderY Offline
      ytdlder
      last edited by

      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
      • ytdlderY Offline
        ytdlder
        last edited by

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

        EkopalypseE 1 Reply Last reply Reply Quote 1
        • EkopalypseE Offline
          Ekopalypse @ytdlder
          last edited by Ekopalypse

          @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
          • ytdlderY Offline
            ytdlder
            last edited by

            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

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors