Community
    • Login

    Styles keyword highlighting stopped working....

    Scheduled Pinned Locked Moved General Discussion
    5 Posts 2 Posters 1.7k 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.
    • C
      csch1701
      last edited by

      Styles keyword highlighting stopped working all of a sudden. I have no idea why or how to get my keyword highlighting working again. I use styles mostly in Python, Batch, PowerShell, VBScript and Jscript source.

      I use Notepad++ at work. At work we have a shared environment under a VDI solution. We are NOT administrators of our own machine, there’s a shared profile everyone uses. The Notepad application is installed for the VDI environment, not per individual user.

      Short story: Uninstalling/reinstalling is not an option for me.

      We are using Notepad++ v8.1 32-bit version of the code.

      What sort of troubleshooting steps or things should I check to determine why the keyword highlighting is no longer working for me? The files are still loading up with the proper extension/language assignment, it’s just the syntax highlighting that is all gone - everything is the default font color/style.

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @csch1701
        last edited by

        @csch1701 ,

        Check to make sure you haven’t gone into the style configurator and set the global override checkboxes to on

        If re-install isn’t an option, then you might try a portable download, which will allow you to run a clean version from a different directory (maybe unzip into a folder on your Desktop)

        Or you could go to the %AppData% and rename the Notepad++ folder; the next time you start Notepad++, it will recreate your settings at default values. (And to go back, rename the new and put the name of the old back the way it was)

        1 Reply Last reply Reply Quote 2
        • C
          csch1701
          last edited by

          Oh, here’s the weird part…

          I was able to download, extract and create a shortcut for Notepad++ v8.1.1 64 Bit version. I have verified that I am using that executable successfully.

          I copied over the stylers.xml from my old installation and put it into my new npp folder.

          Regarding overrides, I am using a global foreground, background, global font size and font. These are the only overrides I use, and I have always used them. They never interfered with the color coding of the keywords in a language, however.

          In this example, I am loading an .asp file. The file loads, but the color coding that should be present is not there.

          The file IS detected under “Language” as an ASP file.

          I have made a LOT of changes to the default colors of various languages and I would rather not lose my stylers.xml file customizations.

          PeterJonesP 1 Reply Last reply Reply Quote 0
          • PeterJonesP
            PeterJones @csch1701
            last edited by PeterJones

            @csch1701 ,

            The point of the portable was a quick experiment to see if default settings were working for you. Since, if I understood what you said in your reply correctly, you overwrote the default settings with your customized settings, we still don’t know if the problem is with your customized settings or something else going wrong specifically on your machine. If you are unwilling to try default settings, even for an experiment, then there’s not much we can do to help you debug what’s wrong with your specific instance

            I unzipped a fresh v8.1.1-64 portable, with default settings, and put in some example ASP code from w3schools.com:
            e8632e0d-34c7-474f-abb2-50b689f89438-image.png

            The contrast isn’t great on my laptop, but the Sub/EndSub/Call are dark blue, and the quoted-text (“strings”) are lighter grey, and the numbers are red – which all match the default settings in the Style Configurator.

            So it’s nothing inherent with v8.1.1 that makes ASP just completely not work. That points strongly to something wrong in your customizations.

            Wait, you said,

            Regarding overrides, I am using a global foreground, background, global font size and font.

            I thought at first that you said just font size and font, which shouldn’t affect the colorization of syntax highlighting. But if you are using the global overrides for foreground and background, then of course you only get those colors; that’s what the global override literally means: it overrides the color globally, regardless of other settings in the syntax highlighter. Watch how my screenshot changes when I enable the global override on foreground and background:
            dfa24486-4f26-4fc3-91c9-e6487a909859-image.png

            So, if you have the “Enable global foreground colour” and “Enable global background colour” checked on, then by definition, you will get no syntax highlight colors. That’s the way Notepad++ works (and always has, in my experience).

            If you really meant that you had set the “default style” colours, rather than the “global override” colours, like this, then it still will have syntax highlighting, but your “plain” text portions will follow those colours, but the syntax highlighting will still be in effect:
            57d2d435-64b6-43b3-8c04-abb78b1782e9-image.png

            But all of these experiments worked for me exactly as I would expect.

            example data

            <!DOCTYPE html>
            <html>
            <body>
            
            <%
            Sub mysub()
               response.write("I was written by a sub procedure")
            End Sub
            
            response.write("I was written by the script<br>")
            Call mysub()
            
            sometext="Welcome to this Web!!"
            response.write(Mid(sometext, 9, 2))
            
            
            %>
            
            </body>
            </html>
            

            Debug Info:

            Notepad++ v8.1.1   (64-bit)
            Build time : Jul  1 2021 - 14:10:53
            Path : C:\usr\local\apps\npp\npp.8.1.1.portable.x64\notepad++.exe
            Command Line : 
            Admin mode : OFF
            Local Conf mode : ON
            Cloud Config : OFF
            OS Name : Windows 10 Enterprise (64-bit) 
            OS Version : 1903
            OS Build : 18362.1256
            Current ANSI codepage : 1252
            Plugins : mimeTools.dll NppConverter.dll NppExport.dll 
            
            C 1 Reply Last reply Reply Quote 2
            • C
              csch1701 @PeterJones
              last edited by

              @PeterJones Thanks for all your assistance, man. I was NOT using global overrides for foreground and background color on the original installation but something caused everything the language styling not to work.

              However, I did remember this incorrectly when I used the standalone install and mistakenly turned those both on.

              On the standalone installation, when I turned these two options off (even with my original customized stylers.xml file) the language syntax highlighting works again.

              As a test, I opened my old install again and it doesn’t have the global foreground and background on, yet the syntax highlighting still does not function.

              So while the original VDI shared install still does not work, you have given me a solution that does work. Thank you for your help!!

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