There must be first distinguished between
default and
custom theme.
The
default themes are
Charcoal,
Classic,
Espresso,
Glitch,
Midnight,
Modern Light,
Slate,
Sterling,
Titanium and
Twilight. The
*.ue-theme files of the
default themes are stored in subdirectory
default data\themes in the
program files directory of UltraEdit. The program files directory of UltraEdit is usually write-protected for a user depending on how UltraEdit was installed (for all users of a machine or for current user only, with default installation path or a custom installation path). The installer of UltraEdit always updates (replaces) the
default *.ue-theme files on every installation, i.e. every update or upgrade of an existing installation. For that reason it is most often not possible and also not advisable that a user modifies a
default theme file directly as being write-protected and the customization of the user would be lost on next update/upgrade of UltraEdit.
But a user can customize nevertheless a
default theme with the
Manage Themes dialog window. UltraEdit creates in this case in the user account related
application data directory of UltraEdit the subdirectory tree
themes\overrides and creates in this directory a
*.ue-theme file with name of the currently used
default theme containing only the XML elements configured different to the corresponding XML elements in the
default theme file in directory
default data\themes in program files folder of UltraEdit.
UltraEdit reads on startup from the INI file which theme to use. In case of usage of a
default theme there is first read the theme file in
default data\themes in program files folder of UltraEdit and next the
override theme file with same name in
themes\overrides in application data directory of UltraEdit to override some of the
default theme settings if an
override theme file exists at all. This simple override mechanism guarantees that the user customizations of a
default theme are not lost even after an update/upgrade of UltraEdit on which the used
default theme file is replaced by the installer of UltraEdit containing perhaps additional settings. There were several enhancements regarding to the themes since UltraEdit for Windows v20.00 has introduced the themes feature resulting in additional XML elements in the
*.ue-theme files in comparison to former versions of the theme files.
A
default theme file like
Midnight.ue-theme in
default data\themes in program files folder of UltraEdit contains
<Language Name="Default"> with the default settings for syntax highlighting languages and their color groups. It can be seen already in file
Midnight.ue-theme that not all languages for the default languages installed with UltraEdit (
*.uew files in the directory
wordfiles in program files directory of UltraEdit) contain the settings for all color groups defined in the syntax highlighting wordfile of the language and the always existing color groups
Text,
Comments,
Alternate Block Comments,
Strings and
Numbers. The settings of the corresponding color group from language
Default (
All languages on tab
Syntax in
Manage Themes window) are used on missing settings for a color group of a syntax highlighting language.
When the user adds a
custom syntax highlighting wordfile to the wordfiles directory configured in configuration of UltraEdit being by default the
wordfiles directory in application data directory of UltraEdit, its color groups are highlighted with the settings as shown on selecting
All languages on tab
Syntax in
Manage Themes window according to language
Default in the used
default theme file respectively the
override theme file. The
override theme file is extended if the user customizes a color group of the
Default language (All languages) or a syntax highlighting language different to the default for all syntax highlighting languages as stored in the used
default theme file.
A user has also the possibility to create a
custom theme by making a copy of a
default theme with a new name and modify the settings of the
custom theme. Such a
custom theme is stored in the
themes subdirectory in the directory of the INI file which is by default the application data directory of UltraEdit. I use such a custom theme which is called
Mofi with
all settings stored in
Mofi.ue-theme. A user can download and use also a custom theme from the
user-submitted editor themes page. There is no override mechanism for the
custom themes. So a user using a
custom theme has to configure additional theme settings after an update/upgrade of UltraEdit introducing additional theme settings himself/herself suitable to the other
custom theme settings.
The following steps can be used to copy the theme settings of one syntax highlighting language to a custom syntax highlighting language on using a
default theme with an
override theme.
- Open in UltraEdit Advanced - Settings or Configuration - Application layout - Advanced which shows the INI file location. Remember the directory path which is by default %APPDATA%\IDMComp\UltraEdit and close the configuration dialog.
- Open in UltraEdit the hopefully already existing override theme file of currently used default theme which is in your case most likely the file %APPDATA%\IDMComp\UltraEdit\themes\overrides\Midnight.ue-theme.
- If this theme file contains already the Language element of the syntax highlighting language from which to copy the theme settings, just copy and paste the entire Language element and change the value of attribute Name in the copy to the name of the syntax highlighting language as defined in the syntax highlighting wordfile in first line. For example if the override theme file contains <Language Name="CSS"> from which the settings should be copied for a custom syntax highlighting language with name L19 WAN, then the entire block from <Language Name="CSS"> to matching end tag </Language> must be copied and pasted in the override theme file with changing in pasted element the language name to L19 WAN.
- But if the override theme file does not contain the Language element of the syntax highlighting language from which to copy the theme settings, open additionally the default theme file of the used theme in directory default data\themes in program files folder. That could be in your case the file %ProgramFiles%\IDM Computer Solutions\UltraEdit\default data\themes\Midnight.ue-theme on using 64-bit UltraEdit on 64-bit Windows installed for all users of the machine into the default installation directory. Search in this file for the Language element with the Name attribute of the syntax highlighting language from which to copy the settings, select and copy the entire element and paste it into the override theme file and change the name of the language in override theme file. Then close the default theme file which is not modified at all.
- Save and close the override theme file and restart UltraEdit. The custom syntax highlighting language should be now displayed with the settings from copied syntax highlighting language.
Example how the color and font style settings are defined for the first color group
Keywords of a
custom syntax highlighting language with name
MyLang using the
default theme
Midnight with 64-bit UltraEdit installed for all users on a 64-bit Windows machine into the default installation directory with using the default directory for the INI file in loading order of UltraEdit.
- Default color and font style settings for color group Color Group 1 as defined in code of UltraEdit.
- Overridden by following data in %ProgramFiles%\IDM Computer Solutions\UltraEdit\default data\themes\Midnight.ue-theme
Code: Select all
<Language Name="Default">
<ColorPair Category="Color Group 1" Foreground="#F92672" Background="#FFFFFF" Auto="true"/>
<FontStyle Category="Color Group 1">Normal</FontStyle>
</Language>
- Overridden by following data in %APPDATA%\IDMComp\UltraEdit\themes\overrides\Midnight.ue-theme
Code: Select all
<Language Name="Default">
<ColorPair Category="Color Group 1" Foreground="#FF0000" Background="#FFFFFF" Auto="true"/>
<FontStyle Category="Color Group 1">Normal</FontStyle>
</Language>
- Overridden by following data in %APPDATA%\IDMComp\UltraEdit\themes\overrides\Midnight.ue-theme
Code: Select all
<Language Name="MyLang">
<ColorPair Category="Color Group 1" Foreground="#800000" Background="#FFFFFF" Auto="true"/>
<FontStyle Category="Color Group 1">Italic</FontStyle>
</Language>
Example as above, but with using the
custom theme file
Mofi.ue-theme:
- Default color and font style settings for color group Color Group 1 as defined in code of UltraEdit.
- Overridden by following data in %APPDATA%\IDMComp\UltraEdit\themes\ Mofi.ue-theme
Code: Select all
<Language Name="Default">
<ColorPair Category="Color Group 1" Foreground="#FF0000" Background="#FFFFFF" Auto="true"/>
<FontStyle Category="Color Group 1">Normal</FontStyle>
</Language>
- Overridden by following data in %APPDATA%\IDMComp\UltraEdit\themes\ Mofi.ue-theme
Code: Select all
<Language Name="MyLang">
<ColorPair Category="Color Group 1" Foreground="#800000" Background="#FFFFFF" Auto="true"/>
<FontStyle Category="Color Group 1">Italic</FontStyle>
</Language>