Notepad++ Hides code elements
-
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:
Language set to Normal Text:
-
@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
orc:\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
anduse
are both the INSTRUCTION WORD style aswarnings
andstrict
, so I would have assumed that any change to the Theme that affectsmy
anduse
would also affectwarnings
andstrict
.
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.
-
@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.
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) -
@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-styleNULL
). You might want to save https://raw.githubusercontent.com/notepad-plus-plus/notepad-plus-plus/master/PowerEditor/src/langs.model.xml asD:\Notepad++\langs.model.xml
, deletelangs.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.
-
@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.
-
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.
-
@Ekopalypse Thanks!
Ehm… today… everything is fine again. WTF? Maybe all I had to do was a reboot…