Windows .reg recognized, but no syntax highlighting? (2)
-
As the four year old original topic
topic/17437/windows-reg-recognized-but-no-syntax-highlighting is understandably locked, just a note to confirm the issue.
Opening a .reg file for the first time did get syntax highlighting which resembled CSS a bit, although it did not present clearly in a dark theme, changing it to another language and then back to Registry ended up with no or “none” highlighting.
Did try ytdlder’s method to return the Registry item to the list, no dice unfortunately.
In Stylers.xml there is a language “Register”, no “Registry” - would that be the cause? -
@Laurie-Stearn said in Windows .reg recognized, but no syntax highlighting? (2):
In Stylers.xml there is a language “Register”, no “Registry” - would that be the cause?
Possibly. In my stylers.xml file (looking thru the GUI) I see
When I open the stylers.xml file (from %appdata%\Notepad++ folder) I see a lexer which references this line. Note it has no extension as I didn’t have a “user ext.” added.
Quite possibly you have a corruption in this file at this location. If you look at the same file in the installed folder (where Notepad++ resides), so either “Program Files” or “Program Files x86” you might see the content referring to the “registry”. If so then consider copying this file over top of the one in the %appdata%\Notepad++ folder. Bear in mind that any alterations you have done in the style configurator will be lost, so the other option will be to copy just the relevant lines from the good stylers.xml file to the bad file.
Terry
PS I should also ask, are you using the most current version of NOtepad++, or an old one.
-
@Laurie-Stearn said in [Windows .reg recognized, but no syntax
Opening a .reg file for the first time did get syntax highlighting which resembled CSS a bit, although it did not present clearly in a dark theme
Highlighting will appear only if the active theme has assigned styles to the particular file type. At the moment, only 3 themes assign styles to Registry, not counting “Default (stylers.xml)” :
$ git grep -li 'name="registry"' -- PowerEditor/installer/themes | awk -F '/' '{print $4}' DarkModeDefault.xml Deep Black.xml Zenburn.xml
So, you will have to choose “DarkModeDefault”, “Deep Black” or “Zenburn” to get styling in Registry files. Or try a third-party theme that covers a wider range of file types, e.g.,
-
Terry-R: Using recent version 8.5.8.
TheStylers.xml
in Appdata is dated 26/01/2023. Using the cloud, so it’s the same. Thelangs.xml
file is dated 2016 - same with you?
Also, no REBOL language in there either, mine must be old,rdipardo: Thanks for the heads up, will keep that in mind.
Ehm, something isn’t working, there are files
stylers.model.xml
,langs.model.xml
andcontextMenu.xml
in Program Files all looking larger and newer than the ones above. This may be related to installing N++ during a network connection issue, is it possible just to install over the current with same? Alternatively, just manually remove the model extension, and copy/replace existing old files?If there is something borked in the setup, it might explain the absence of Edit with Notepad++ (Admin) on the context menu.
This all worked on W10, anyhow there’s a related question at github:notepad-plus-plus/issues/13410#issuecomment-1787024809
-
@rdipardo said in Windows .reg recognized, but no syntax highlighting? (2):
Or try a third-party theme that covers a wider range of file types
You have a third-party theme that you haven’t shared in the Notepad++ Themes Collection? Shame on you. ;-)
-
@Laurie-Stearn said in Windows .reg recognized, but no syntax highlighting? (2):
The langs.xml file is dated 2016 - same with you?
Your
langs.xml
is 7 years out of date.there are files
stylers.model.xml
,langs.model.xml
andcontextMenu.xml
in Program Files all looking larger and newer than the ones aboveCorrect, the installer does not update your copies of the non-model files, because it might delete customizations you’ve made, which would annoy users who have customized.
If you haven’t customized any of your stylers, language keywords, or context menu, then you can safely delete the versions in
%AppData%\Notepad++
and the next time you run Notepad++ it will re-create those files from their defaults.If you have customized those, then I would suggest using the ComparePlus plugin to compare
%AppData%\Notepad++\____.xml
toC:\Program Files\Notepad++\___.model.xml
, and bring across anything from the.model.xml
that doesn’t clobber your customizations. -
@PeterJones :
Bit late to get back in order to say thank you muchly, “Registry” language looks great now.
Quite a few /corrections changes in Langs and Stylers since 2014,PREPROCESSOR
is now omitted for Java, andDIRECTIVE
,DIRECTIVE OPERAND
for VHDL, heck never used those. As for the changes inGlobalStyles
in missing out on the pleasures ofBookmark margin
,Change History margin
,Document map
,EOL custom color
andNon-printing characters custom color
, good to have them in!(Note to self for next time: On a manual copy only worry about the
GlobalStyles
in Stylers as running a weird darkish theme under “Light Mode” where the styling for ini, reg, XML CSS and the like is easy on the eye albeit a little dark.)