"All languages" Wordfile

"All languages" Wordfile

691
Advanced UserAdvanced User
691

    May 30, 2021#1

    In the Readme for the Syntax Highlighting forum I see this:
    For example I have for myself years ago played with all the color settings to get a combination I like, copied that settings to all languages and adapted the language definitions in my wordfiles (standard and project wordfiles) to use always the same color group for the same type of words. I have never made any changes to the color and style settings since I have done this, just to the language definitions in the wordfiles.
    Do I need to create a UEW file for "All Languages"?
    With thanks for any reply

    6,687586
    Grand MasterGrand Master
    6,687586

      May 30, 2021#2

      I wrote this long time ago before the Manage Themes dialog existed with the tab Syntax with All Languages at top.

      The default is that a user configures for each color group for each syntax highlighting language the color and font style settings as preferred by the user.

      I don´t do that. I played hours many years ago to find a color scheme for all visible elements within UltraEdit main window which I liked for myself including the colors of a syntax highlighting language. Then I copied the color settings for a syntax highlighting language to every used syntax highlighting language directly in the INI file (UE for Windows ≤ v14.20) or into each wordfile (v15.00 ≥ UE for Windows ≤ v19.10) or in the (custom) theme file (UE  ≥ v20.00). Further, I arranged the word groups in each syntax highlighting wordfile to my preferred color scheme for a syntax highlighting language.  So the color group 1 has the same color and font style settings in all syntax highlighting languages (wordfiles) used by me, and color group 2 is also configured identical for all syntax highlighting languages and so on as I configured the words in the wordfiles suitable to the color and font style settings. Well, there are a few exceptions for a few syntax highlighting languages where I have enabled a special background color highlighting, but the text color and font style settings are really identical for all languages. I don't use any wordfile as installed with UltraEdit, but of course my custom wordfiles are derived from some of the standard wordfiles regarding to the list of words.

      The All Languages list item in Manage Themes dialog window on tab Syntax is for configuring the Default syntax highlighting language settings which are used on user adds a new wordfile to the wordfiles directory.  Modifications on settings of a color group on having All Languages selected does not modify any setting for any already configured syntax highlighting language. There is no wordfile for the language Default in the theme file customized by using All Languages list item. My custom theme files contains for language Default  the color and font style settings which I prefer for all the used syntax highlighting language. The big advantage for me is that I can add now a wordfile for syntax highlighting one more language and UltraEdit automatically applies my preferred language color and font style settings to the new language since UltraEdit for Windows v20.00 because of language Default in the them file defined by All Languages in Manage Themes window. So I have to customize now only the wordfile manually and not anymore the language color and font style settings of a new language.
      Best regards from an UC/UE/UES for Windows user from Austria

      691
      Advanced UserAdvanced User
      691

        Jun 06, 2021#3

        Thanks Mofi
        I am running V26.X
        I want to copy the color settings for a syntax highlighting language to another.
        Q1 From what I understand above I need to locate "the (custom) theme file (UE  ≥ v20.00)". Is this correct?
        Q2 I have looked in vain for this file. What I found is quite confusing. Could you let me know what path I might find this? Is the one I located below correct?
        I made a change to Layout > Themes > Manage Themes > Select "Midnight" theme > Language = L19 WAN > Made a single change setting color group one (C1 Blue) as shown
        I noted changes to this file:
        C:\Users\shaun\AppData\Roaming\IDMComp\UltraEdit\themes\overrides\Midnight.ue-theme
        It was updated with what looked to be changes corresponding to the edit I made
        There are several questions about this which is not clear to me.
        Q3 Why are only Color Groups 10,11 and 12 listed initially? Are the others perhaps defaulted?
        Q4 Note Color 1 was not in the file and then there was an entry made apparently to reflect the edit. This is encouraging. Presumably Foreground="#0000FF corresponds to the deep blue color I set. Note however Color 1 has a line now reflecting the Bold setting. I did not change this. It was already there. Was this file out of sync before?

        Many thanks for any light thrown on this confusing issue....
        2021-06-06 17h40m56 Theme3 POST.png (275.24KiB)

        6,687586
        Grand MasterGrand Master
        6,687586

          Jun 06, 2021#4

          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.
          1. 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.
          2. 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.
          3. 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.
          4. 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.
          5. 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>

            Jun 06, 2021#5

            slouw wrote:Q1 From what I understand above I need to locate "the (custom) theme file (UE  ≥ v20.00)". Is this correct?
            You are not using a custom theme file and for that reason you cannot find one.
            slouw wrote:Q2 I have looked in vain for this file. What I found is quite confusing. Could you let me know what path I might find this? Is the one I located below correct?
            Yes, the override theme file C:\Users\shaun\AppData\Roaming\IDMComp\UltraEdit\themes\overrides\Midnight.ue-theme is the file to manually edit.
            slouw wrote:Q3 Why are only Color Groups 10,11 and 12 listed initially? Are the others perhaps defaulted?
            Yes, all color groups with current settings identical to the settings in C:\Program Files\IDM Computer Solutions\UltraEdit\default data\themes\Midnight.ue-theme are not present in the override theme file for the reasons described in previous post.
            slouw wrote:Q4 Note Color 1 was not in the file and then there was an entry made apparently to reflect the edit. This is encouraging. Presumably Foreground="#0000FF corresponds to the deep blue color I set. Note however Color 1 has a line now reflecting the Bold setting. I did not change this. It was already there. Was this file out of sync before?
            No, it was not out of sync before. UltraEdit stores all settings of a color group (text color, background color, background automatic, font style) in the override theme file if any setting of a color group was customized by a user. In other words with taking into account that UltraEdit is coded in C++ all the data in data structure of a color group class are stored in the override theme file on any data difference and not just the different elements of the data structure.
            Best regards from an UC/UE/UES for Windows user from Austria

            691
            Advanced UserAdvanced User
            691

              Jun 06, 2021#6

              Thanks Mofi
              Looks very comprehensive as usual.
              I will take a while to go through this.
              Thank you sir

                Possible redundant data on Color Index lines

                Jun 10, 2021#7

                Thanks again Mofi
                I am slowly working through the above.
                Very helpful.
                I have on the color index definition linw /C1...../C20 there exists alot of data which my be redundant.
                See stuff highlighted in screenshot below.
                Should that all be deleted?

                thanks again
                2021-06-10 11h26m34-StdF UE Color Line Data.png (206.87KiB)

                6,687586
                Grand MasterGrand Master
                6,687586

                  Jun 10, 2021#8

                  The color and font style settings in the wordfiles itself are no longer used by UltraEdit since v20.00 introducing the themes feature. So it would be good to delete them for faster processing the wordfiles by UltraEdit on startup. Please take a look on The ultimate macros to manage wordfiles and their color settings.
                  Best regards from an UC/UE/UES for Windows user from Austria