Lost my R style settings with 8.6.7 update.
-
I’ve tried reconfiguring them but the default settings for comments, functions etc aren’t listed. When I select R language and try to change the style, R is no longer an option and I can’t adjust individual settings, but can only choose a style configuration which is not specific to R. Also, how do I save the style once I get it customized and all settings to a different folder in windows 11 to avoid losing it when the program is updated?
-
but the default settings for comments, functions etc aren’t listed.
Screenshot from v8.6.7:
When I select R language and try to change the style, R is no longer an option
Those two statements seem self-contradictory, to me. I am thinking that meant “I can select Language > R > R, but when I go to Style Configurator, I cannot find R in the Language column.”
But the only way that would happen is if your
stylers.xml
or activethemes\ThemeNameHere.xml
is somehow missing the R entry, and I don’t see how that could happen, assuming it used to be there.Hmm.
Did you start with the Default (
stylers.xml
) theme, do all your customization, and then choose a different theme? Because customizations are theme-dependent, so a customization tostylers.xml
will not affect the “HelloKitty” theme.Also, some themes are missing certain attributes, or (as I described below), you have a copy of a theme or
stylers.xml
that hasn’t been updated to include some of the newer styles for a given language. For example, two years ago, v8.4.7 added six new styles to R, so my copy didn’t have them until today, when I copied them fromstylers.model.xml
tostylers.xml
. So if I had customized a theme that had all 16 styles for R, then changed to the default theme, those six styles would have disappeared from the Style Configurator.Also, some themes are missing certain languages altogether, so if you switch to a theme that doesn’t have that language (either because it’s an old theme that hasn’t been updated to include a certain language, or because your customized version of
stylers.xml
has not been overwritten by updates to include the updates from the last few years), then it will disappear from the Style Configurator list altogether (for that Theme). So that could explain how the R entry would “disappear”To be clear: Notepad++ v8.6.7 (and even the newer v8.6.8, which hasn’t triggered auto-update yet) still has full settings for R – nothing has changed in regard to that Language in many versions (specifically, R has been the same since v8.4.7).
Also, how do I save the style once I get it customized and all settings
Notepad++ always saves its config files when you exit; any customized settings are included in that save.
to a different folder in windows 11
Those settings are in files saved in
%AppData%\Notepad++\
🛈 for a normal installation – and, in general, to your active Config File Location (as described in the User Manual). So you can choose to make a backup of your specific config-file location, if you desire.to avoid losing it when the program is updated?
Under normal circumstances, Notepad++ does not overwrite your customized settings when it’s updated, to the point that often new features (like the style configurator entries for new languages or updated languages) don’t show up in the GUI settings because the most recent update doesn’t overwrite
stylers.xml
orthemes\*.xml
. In the 15 years that I’ve been using Notepad++, I cannot remember the updater ever accidentally deleting my customized configuration (whereas I’ve had to intentionally replace or edit them, as mentioned above, to get the languges or style entries).Every once in a while, people have complained in the forum that the updater has somehow overwritten their settings, despite the protections built into the updater to avoid just that circumstance. But they have never been able to give a repeatable sequence of events that the developers can use to see the problem in action, and thus be able to debug and fix the problem.
My questions would be:
- Regarding the old version:
- What was the old version number?
- Was it 32-bit or 64-bit?
- Where was it installed (
c:\program files\notepad++\
, or somewhere else)? - Was it in normal
%AppData%
mode, or local config (aka “portable”) or using Cloud settings directory, or the-settingsDir
command line option? - It’s a bummer that you cannot go back in time and grab ? > Debug Info from the old version, because that would answer all those questions, and then some.
- Regarding the new version
- What was the old version number?
- Was it 32-bit or 64-bit?
- Where was it installed (
c:\program files\notepad++\
, or somewhere else)? - Was it in normal
%AppData%
mode, or local config (aka “portable”) or using Cloud
settings directory, or the-settingsDir
command line option? - Since you don’t have to go back in time, please grab the ? > Debug Info from the new version?
- Regarding the upgrade
- Was it the “automatic update” – when Notepad++ opened, and told you it wanted to update, and you agreed to let it update?
- Was it a “manual update” – you manually went to ? > Update Notepad++ to force the update?
- Did you manually download the installer, and run it yourself?
- When the update occurred, was Notepad++ running normally, or in “Administrator” mode?
- When the update ocurred, were you running in multi-instance mode, or was there just one Notepad++ window open?
- How many copies of Notepad++ are on your machine
- Check both
c:\program files\Notepad++
andc:\program files (x86)\Notepad++
- Look for portable versions that you may have unzipped in other places
- Look for installed versions that were installed in non-standard locations
- Search the registry for
notepad++.exe
, and make sure they all point at the same copy, rather than having a mixed bag of pointers
- Check both
All of those things might possibly influence the behavior of the updater. My working theory has always been that people have been in weird situations without knowing it (or remembering it) – like running the updater from a portable, and having it install a fresh notepad++ in the default location, so of course it doesn’t keep any of the settings. And sometimes Admin-mode vs normal-user means that permissions on one or more config files cause weird things to happen.
- Regarding the old version:
-
Thank you very much for the detailed response. I was able to recover my settings by manually going through and changing them individually. It took several hours of trial and error to do. I believe I followed these steps finally:
Language: R
Settings: Style Configurator
Select Theme: DarkModeDefault
Language R:
Style: Default - Changed font and size
Style: Manually changed the settings on all other categories.But I cannot find the config.xml or stylers.xml files to save for future use in case they are lost. There is only one folder for Notepad ++ in C:/Program Files/ and nothing in C:/Programs Files (x86)/. There is a stylers.model.xml dated 5/11/2024, but I just updated the program and the configuration today, so I doubt this is the current file. Nonetheless, I will copy this file for safe keeping. Any other suggestions for where the configuration settings are saved would be appreciated.
-
@Mark-Johnson said in Lost my R style settings with 8.6.7 update.:
But I cannot find the config.xml or stylers.xml files to save for future use in case they are lost.
%appdata%\Notepad++
See HERE for more info about that.
-
That’s it!! Thank you so much.
-
@Mark-Johnson said in Lost my R style settings with 8.6.7 update.:
Select Theme: DarkModeDefault
Then saving
stylers.xml
will not be enough for you. As I said, each theme stores its style-configurator settings separately. If you want to save customizations to DarkModeDefault, then you would have to backup%AppData%\Notepad++\themes\DarkModeDefault.xml
(or, for other users who aren’t using AppData, in the appropriate Config File Location, as linked above)