Notepad++ just can't remember the barckground color setting of the "Line number Margin" in Global Styles
-
The barckground color setting of the “Line number Margin” will automatically change into disabled (some slashs) when NP++ restarts.
debug info:
Notepad++ v7.9.5 (64-bit)
Build time : Mar 21 2021 - 02:13:17
Path : C:\Softwares\NotePadPP\notepad++.exe
Admin mode : ON
Local Conf mode : ON
OS Name : Windows 10 Enterprise LTSC 2019 (64-bit)
OS Version : 1809
OS Build : 17763.1490
Current ANSI codepage : 936
Plugins : AnalysePlugin.dll ComparePlugin.dll XBrackets.dll -
The barckground color setting of the “Line number Margin” will automatically change into disabled (some slashs) when NP++ restarts.
That’s not technically “disabled”: it really means “inherit from Default” – but I guess it’s okay if you want to think of it as “disabled”.
It’s a known bug with the Style Configurator that if one of the styles starts as “inherit from Default” when you load Notepad++, it will “get stuck” and even if you change it for this instance, it will come back as “inherit from Default” again when you reload.
To work around this bug:
- Exit all copies of Notepad++, then reload with just one instance.
- Open
c:\Softwares\NotePadPP\stylers.xml
- Assuming you are using the default theme, this is the right file, based your “Local Conf mode : ON” and the notepad++.exe path in your debug info.
- If you are using a different theme, like
DarkModeDefault
for example, you would editc:\Softwares\NotePadPP\themes\DarkModeDefault.xml
(or whichever theme you are using, in thethemes\
directory) - most users would edit
%AppData%\Notepad++\stylers.xml
for the default theme, and%AppData%\Notepad++\themes\<ThemeNameHere>.xml
for any other theme.
- Search for “Line Number Margin” in the
<Global Styles>
section: - Delete the
colorStyle="1"
attribute completely: - Save
- Exit Notepad++ completely, then restart. The
colorStyle
attribute should have stayed how to set or delete it, and the margin should now be the color set, rather than inheriting from the default background.
-
It worked out nicely since I had followed your steps.
Thanks so much! -
@Demolemon11 said in Notepad++ just can't remember the barckground color setting of the "Line number Margin" in Global Styles:
Admin mode : ON
BTW: Unless you have a really good reason (ie, you are only editing protected files, like ones in
c:\windows\
orc:\program files\
), in general, it is best to not use Admin Mode when running Notepad++ , except on the rare occasion you need the extra permissions. (It makes it, for example, that you cannot simply drag a file from a Windows Explorer window into Notepad++, because the Explorer isn’t run as Admin but Notepad++ was.)Notepad++ v7.9.5 (64-bit)
Build time : Mar 21 2021 - 02:13:17Also, you’re on v7.9.5, which was released in March 2021; the current version is v8.6.9: that’s really out-of-date. If there ever is a bug fix for the “inherit from default” setting in the GUI, you are going to have to upgrade if you want that bugfix. And there have been a lot of improvements in Notepad++ in the last 3.5 years, so you’re probably missing out on other important fixes. Upgrading or not is, of course, your choice… but again, I’d recommend at least trying out v8.6.9 (in a portable edition, if you don’t want to overwrite your installed copy)
-
@PeterJones
Thanks for suggestion.
However, I use an unusual windows version that only remain a ADMINISTRATOR account, many functions was striked out, like switching accounts.
Thus, NP++ just can only run as a super administrator.
My old Laptop just can’t carry newer windows’ softwares