Community
    • Login

    Notepad++ Hides code elements

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    7 Posts 3 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.
    • EffiosoE
      Effioso
      last edited by Effioso

      Hi!

      I currently have the problem that Notepad++ hides code elements. I assume that my 2-year old son may have hit some kind of key combination that results into this.
      If I set the language to Normal Text I can see everything. I’m programming in Perl. When I change the language to Perl all Perl commands are no longer displayed (EG commands like “print”, “use” or “my”). Switching to other languages also hides their commands. For example if I choose HTML and write “<body id=”…"> the “id” is no longer displayed.

      Language set to Perl:
      perl.png
      Language set to Normal Text:
      text.png

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

        @Effioso ,

        That is odd.

        I assume you are using DarkModeDefault as your Theme – Settings > Style Configurator > Select Theme: DarkModeDefault. If you go to Language: Perl in that same dialog, and select Style: INSTRUCTION WORD, check to see if Font size has been set to something. For the hidden semicolons, check the color and font size on Style: OPERATOR

        If it’s really something corrupt with your theme, the solution might be as simple as going to https://raw.githubusercontent.com/notepad-plus-plus/notepad-plus-plus/master/PowerEditor/installer/themes/DarkModeDefault.xml and saving the unedited version of the theme overtop %AppData%\Notepad++\themes\DarkModeDefault.xml or c:\program files\Notepad++\themes\DarkModeDefault.xml (assuming normal installation) – you would have to exit Notepad++ before saving the new copy of the theme, and run Notepad++ after it’s saved to see if it’s better.

        However, it’s strange, because my and use are both the INSTRUCTION WORD style as warnings and strict, so I would have assumed that any change to the Theme that affects my and use would also affect warnings and strict.
        29bfaa0a-4e12-4f7c-a533-60d4be6914d2-image.png
        bbc72731-79d9-45a4-89a5-56474861a23d-image.png

        I wonder if you’ve got a plugin that’s doing something. Sharing ?-menu’s Debug Info will tell us what version and plugins you are using, and might give other clues.

        But, so far, I cannot reproduce using v8.5.

        EffiosoE 1 Reply Last reply Reply Quote 1
        • EffiosoE
          Effioso @PeterJones
          last edited by Effioso

          @PeterJones said in Notepad++ Hides code elements:

          %AppData%\Notepad++\themes\DarkModeDefault.xml or c:\program files\Notepad++\themes

          Thanks a lot! I replaced the whole XML file - but no change. Also there is no font size or anything else set up.
          But it definately has to do with the dark theme. For testing purposes I switched to the light theme and everything’s fine.
          instruction.png
          operator.png

          Debug info:
          Notepad++ v8.4.8 (64-bit)
          Build time : Dec 24 2022 - 19:40:27
          Path : D:\Notepad++\notepad++.exe
          Command Line :
          Admin mode : OFF
          Local Conf mode : OFF
          Cloud Config : OFF
          OS Name : Windows 11 (64-bit)
          OS Version : 22H2
          OS Build : 22621.1413
          Current ANSI codepage : 1252
          Plugins :
          mimeTools (2.9)
          NppConverter (4.5)
          NppExport (0.4)

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

            @Effioso ,

            So it’s not a plugin. When I switch to v8.4.8 to match yours, I still cannot replicate your results.

            Your keyword list is in a different order than mine. And NULL isn’t in the default keyword list (and isn’t a Perl keyword, that I’ve ever seen; Perl uses undef for a similar concept, not a c-style NULL). You might want to save https://raw.githubusercontent.com/notepad-plus-plus/notepad-plus-plus/master/PowerEditor/src/langs.model.xml as D:\Notepad++\langs.model.xml, delete langs.xml from both the install directory and the appdata hierarchy, and re-run Notepad++; maybe something got corrupted in there to mess up your language definitions, which is confusing the parser (though why it would work right in light mode but not in dark mode…)

            Also, you might want to close out of Notepad++, download a portable v8.4.8 from the official downloads site (https://notepad-plus-plus.org/downloads/v8.4.8/), unzip to a temporary directory, and try running in dark mode from the portable, and see if that version works right for you. If it does, then one of your configuration files, either in your installation directory or you user settings in AppData hierarchy, is somehow corrupting your installed copy.

            EffiosoE 1 Reply Last reply Reply Quote 0
            • EffiosoE
              Effioso @PeterJones
              last edited by

              @PeterJones Thanks for your help. :)
              OK, that is totally weird… Even the portable version has this issue. oO
              As soon as I switch portable to dark mode, the issue occurs.
              It’s not just Perl that is affected.
              HTML also hides some keywords for example.
              For example: <body id=“xxxx”> removes the “id”.

              The langs.xml in AppData is from 2016 and the langs.model.xml in D:\Notepad++\langs.model.xml has a change date from December 2022. So basically there shouldn’t be any corruption. And it was working fine just a few days ago.

              EkopalypseE 1 Reply Last reply Reply Quote 0
              • EkopalypseE
                Ekopalypse @Effioso
                last edited by

                @Effioso

                temporarily rename the notepad++ directory under APPDATA and then run npp. I know you said that the portable version has the problem too, but maybe it still reads incorrect data from APPDAT.

                EffiosoE 1 Reply Last reply Reply Quote 1
                • EffiosoE
                  Effioso @Ekopalypse
                  last edited by

                  @Ekopalypse Thanks!

                  Ehm… today… everything is fine again. WTF? Maybe all I had to do was a reboot…

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