Settings, custom styles and shortcuts got reset after power loss
-
I use npp with dark mode all the time and had configured some settings. Until one day my computer just powered off suddenly while npp is still open. After reopening, it shows glaring white theme and all of my settings and styles are reset to default. Can anyone confirm if it’s a known bug? Is there any fix or chance to be fixed in the future update?
Currently using version 8.5.7.
-
It’s very hard for an application to 100% protect against the OS corrupting things during a crash. It sounds like your OS corrupted settings.xml… those settings are now lost, and Notepad++ has written a new copy of settings.xml with its default values.
If you want to protect against this in the future, then after you’ve gotten your settings back the way you like them, copy settings.xml from
%AppData%\Notepad++\
to a “safe” backup location. If it ever happens again, then copy from that backup to the appdata location. (And as you change settings over time, you’ll have to update your backup.) -
Thanks for the answer. One question, what file should I copy to backup my custom style? Files inside the themes folder, stylers.xml or both?
-
@siswonugroho said in Settings, custom styles and shortcuts got reset after power loss:
One question, what file should I copy to backup my custom style? Files inside the themes folder, stylers.xml or both?
That depends completely on your definition of “my custom style”.
- Do you mean “I am using the default light mode theme, but with manual edits”? Then you need to backup
stylers.xml
- Do you mean “I am using the DefaultDarkMode theme, which is what it naturally picks when I chose dark mode”? Then if you use it without editing, just pick Dark Mode again, and it will go back to the right theme; if you do edit the DefaultDarkMode theme, then you will have to backup that theme’s file from the
themes\
folder. - Do you mean “I picked the ‘Bespin’ theme (or one of the other built-in themes) and haven’t made any changes to it”? Then all you have to do is re-pick the ‘Bespin’ theme (or whichever it was) if N++ ever reverts to default again.
- Do you mean “I picked the ‘Bespin’ theme (for example) and then made changes to the stylings defined by that theme”? Then you will have to save a backup of your modified ‘Bespin’ theme from the
themes\
directory. - Do you mean “I downloaded some other theme that doesn’t ship with Notepad++ and put it in my
themes\
directory, and am using that theme”? Then you will want to backup that theme.
- Do you mean “I am using the default light mode theme, but with manual edits”? Then you need to backup