• Login
Community
  • Login

Notepad++ Hides code elements

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
7 Posts 3 Posters 1.2k 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.
  • E
    Effioso
    last edited by Effioso Apr 4, 2023, 11:20 AM Apr 4, 2023, 11:19 AM

    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

    P 1 Reply Last reply Apr 4, 2023, 1:16 PM Reply Quote 0
    • P
      PeterJones @Effioso
      last edited by PeterJones Apr 4, 2023, 1:17 PM Apr 4, 2023, 1:16 PM

      @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.

      E 1 Reply Last reply Apr 4, 2023, 1:28 PM Reply Quote 1
      • E
        Effioso @PeterJones
        last edited by Effioso Apr 4, 2023, 1:28 PM Apr 4, 2023, 1:28 PM

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

        P 1 Reply Last reply Apr 4, 2023, 1:44 PM Reply Quote 0
        • P
          PeterJones @Effioso
          last edited by Apr 4, 2023, 1:44 PM

          @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.

          E 1 Reply Last reply Apr 4, 2023, 2:06 PM Reply Quote 0
          • E
            Effioso @PeterJones
            last edited by Apr 4, 2023, 2:06 PM

            @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.

            E 1 Reply Last reply Apr 5, 2023, 6:46 AM Reply Quote 0
            • E
              Ekopalypse @Effioso
              last edited by Apr 5, 2023, 6:46 AM

              @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.

              E 1 Reply Last reply Apr 5, 2023, 7:19 AM Reply Quote 1
              • E
                Effioso @Ekopalypse
                last edited by Apr 5, 2023, 7:19 AM

                @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
                4 out of 7
                • First post
                  4/7
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors