Adding wordfiles in UE 15

Adding wordfiles in UE 15

236
MasterMaster
236

    Apr 03, 2009#1

    Dear all,

    I've just installed V15.00.0. When I checked the Syntax highlighting settings, I saw that UE was still using the old wordfile.uew from my previous installation. I then copied the two extra language sections I had in that file (Python and UE Wordfiles) to new files python.uew and idm_wordfiles.uew in the new "wordfiles" directory alongside the others that were there. I closed UE and renamed the old wordfile.uew.

    On the next program start, UE appears to have found the new wordfiles in the wordfiles directory, but only those that were pre-installed. According to the website, adding new wordfiles is as easy as saving them in the wordfiles directory, but that doesn't seem to be the case. Anything else I have to do to have UE find my two extra wordfiles? They don't appear in the dropdown list in the configuration dialog, and they are not being applied to .py/.uew files... What am I missing? The German help isn't much help since it still covers the status quo of V14...

    Thanks,
    Tim

    36
    Basic UserBasic User
    36

      Apr 03, 2009#2

      I didn't have any problems adding my wordfiles. I just put them in the wordfile dir found in the UE installation dir. They seem to also put a copy of them in %appdata%\IDMComp\UltraEdit\wordfiles\ (this is under windoze xp)

      Did you keep the /L<number> at the start of the wordfiles? Dunno if that matters, but it seems intact on all the single file word files I have. Also is the parameter "Full directory path to wordfiles" set to the correct directory? (I haven't changed mine, it pointed correctly after the upgrade)

      What has me irritated is how coloring now works. Would've been nice if it had taken the old Language sections and exported with your current wordfile to the new format. Will write a script to fix that for me as it's way to much work to do it completely by hand.

      236
      MasterMaster
      236

        Apr 03, 2009#3

        Aaahh! That was it! I saw the new directory in the %appdata% path and copied my files there - UE was looking for its wordfiles in the Program Files directory. Weird to have them in two places...

        Thanks,
        Tim

        2362
        MasterMaster
        2362

          Apr 03, 2009#4

          I have the same issue with getting the colors out of the ini file and into the word files.

          I have decided not to do it until I can write a script to automate the task for me.

          Problem is, I just installed 15, and I don't yet know what this new color format is. I've noticed it's there, but will have to see how it works before I can write a conversion script to handle it for me. This will be an interesting conversion to say the least. I simply can't handle the default colors, and need to get my old colors set up right. I had backed up my original files, but did a complete uninstall then a clean install of UE 15, and am working from there.

          If anyone comes up with a script, please get it posted on the forums ASAP. If it's a great universal script, then it will need to go to the power tools section of the site I am sure.
          “Don’t document the problem, fix it.” – Atli Björgvin Oddsson

          36
          Basic UserBasic User
          36

            Apr 03, 2009#5

            As I said I've only made a very rudimentary script for it. It just splits up the strings from the ini-file and presents them as they should be pasted into the word files. I do the rest manually.

            They are built up like this:
            example:
            ini-file
            [Language 3 Colors]
            Colors=65535,12632256,8388608,65535,16711935,16777215,16777215,13041663,65280,4259584,16777215,8961234,12509401,
            Colors Auto Back=1,1,1,1,1,1,1,1,1,1,1,1,1,
            Colors Back=8388608,8388608,8421504,8388608,8388608,8388608,8388608,8388608,8388608,8388608,8388608,16777215,16777215,
            Font Style=0,0,0,0,0,0,0,0,0,0,0,0,0,

            word file
            /Colors = 65535,12632256,8388608,65535,16711935,
            /Colors Back = 8388608,8388608,8421504,8388608,8388608,
            /Colors Auto Back = 1,1,1,1,1,
            /Font Style = 0,0,0,0,0,

            then you have the /Cx sections which look like this
            /C1"Keywords" STYLE_KEYWORD Colors = 16777215 Colors Back = 8388608 Colors Auto Back = 1 Font Style = 0
            .
            .
            .

            The first five positions (italic) in the ","-separated lists (from the ini-file) goes in to the /Colors, /Colors Back etc section. The rest (6 and up, 5 when starting with 0, bold) goes into the /Cx-sections. Also note that I use Colors Auto Back so I ignore the section Color Back and set them as 0.

            Should give you enough to go on if you want to slap up a nice and fully automated script =)

            edit:
            The script outputs the following, I don't parse the ini-file tho, I have copied the relevant color codes from the ini-file to variables in the script. Don't think I'll have time to do anything fancier tho I'm afraid.

            /Colors = 65535,12632256,8388608,65535,16711935,
            /Colors Back = 0,0,0,0,0,
            /Colors Auto Back = 1,1,1,1,1,
            /Font Style = 0,0,0,0,0,

            The following are supposed to be added to the end of the /Cx-lines
            Colors = 16777215 Colors Back = 0 Colors Auto Back = 1 Font Style = 0
            Colors = 16777215 Colors Back = 0 Colors Auto Back = 1 Font Style = 0
            Colors = 13041663 Colors Back = 0 Colors Auto Back = 1 Font Style = 0
            Colors = 65280 Colors Back = 0 Colors Auto Back = 1 Font Style = 0
            Colors = 4259584 Colors Back = 0 Colors Auto Back = 1 Font Style = 0
            Colors = 16777215 Colors Back = 0 Colors Auto Back = 1 Font Style = 0
            Colors = 8961234 Colors Back = 0 Colors Auto Back = 1 Font Style = 0
            Colors = 12509401 Colors Back = 0 Colors Auto Back = 1 Font Style = 0

            6,605548
            Grand MasterGrand Master
            6,605548

              Apr 07, 2009#6

              As I updated to UE v15.00.0.1033 UltraEdit updated on first start my wordfile with 18 language definitions by adding the default color and font style settings to every language.

              Code: Select all

              /Colors = 0,8421376,8421376,8421504,255,
              /Colors Back = 16777215,16777215,16777215,16777215,16777215,
              /Colors Auto Back = 1,1,1,1,1,
              /Font Style = 0,0,0,0,0,
              /C1 Colors = 16711680 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
              /C2 Colors = 255 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
              /C3 Colors = 33023 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
              /C4 Colors = 32768 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
              /C5 Colors = 4210816 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
              /C6 Colors = 16711680 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
              /C7 Colors = 16711680 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
              /C8 Colors = 16711680 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
              Very interesting is that it looks like a color group must contain words or the color settings are not applied. In my personal wordfile I use always /C8"C8 not used" for not used color groups. On such color group lines with no words below no Colors = ... is added. That problem was fixed with v15.00.0.1045.

              Be very careful when copying the color settings from the INI file. The spaces around the equal sign are important as it is also for "/Delimiters = " and the other keywords. There must be a 100% case-sensitive string compare match with the strings used in the wordfile and the strings stored in the EXE or the lines/words with the color settings are interpreted as words for being highlighted.

              Because this "replace" of my preferred color settings with the default color settings is also not satisfactory for myself, I asked yesterday evening (CET) IDM by email for their future plans on this issue. And with UE v15.00.0.1045 finally the taking over of the settings from the INI to the wordfile works perfect.

              With the color settings stored in the wordfile sharing a wordfile is now not so easy anymore. Also a common wordfile on a server for all users is now not possible anymore if only 1 user can't work with the color settings stored in this wordfile. Would be interesting if the users which requested color settings to be stored in the wordfile and several wordfiles instead of only 1 has thought about such configurations too.

                Apr 07, 2009#7

                pietzcker wrote:I saw the new directory in the %appdata% path and copied my files there - UE was looking for its wordfiles in the Program Files directory. Weird to have them in two places...
                Well, the installer must install the wordfiles to a directory which exist for all users. So the wordfiles are installed into a subdirectory named wordfiles in the UltraEdit program directory. If there is not already a subdirectory wordfiles in the directory of the INI file used, UltraEdit copies the entire directory wordfiles from the program directory to directory of the INI file, or better this should be done for supporting multiple users or 1 user with multiple accounts on 1 computer. Unfortunately this directory copy is done also when uedit32.ini is stored in the program directory of UE as on my computer and not in %appdata%\IDMComp\UltraEdit\. I have to inform IDM about this issue. I start to feel sorry for not installing and testing any beta version because I was so busy.

                I'm just happy that UltraEdit still supports uedit32.ini with all other user specific configuration files stored in the program directory. So I can at the moment easily switch between v15.00.0.1034 and v14.20.1.1008 by just executing the VB script of Bego posted at evaluate newer version.
                Best regards from an UC/UE/UES for Windows user from Austria

                119
                Power UserPower User
                119

                  Apr 07, 2009#8

                  Mofi wrote:Would be interesting if the users which requested color settings to be stored in the wordfile and several wordfiles instead of only 1 has thought about such configurations too.
                  I'm one of the users that requested multiple wordfiles as a mechanism for supporting an unlimited number of languages. I don't recall requesting color settings in the wordfile but I'm happy about the change as it makes it much easier for me to share wordfiles across installations on different computers.

                  One configuration option that I'd like to see is a way to change the default colors for syntax highlighting. If I could do that I'd almost never need to tweak the colors for individual languages.

                  6,605548
                  Grand MasterGrand Master
                  6,605548

                    Apr 07, 2009#9

                    Yes, multiple wordfiles with 1 language per wordfile makes sharing and distributing wordfiles much easier. I have no problem with that enhancement, especially because wordfiles with multiple languages are still supported. Also a project specific wordfile with only the languages needed for that project and of course customized for the project is still working. In future it is maybe also possible to specify a project specific wordfiles directory which contains 1 or more *.uew files for that project. Currently (UE v15.00.0.1034) it is not possible to specify in the project settings dialog a directory containing the project specific wordfiles.

                    But storing the color settings in the wordfile is a nightmare for me and my colleagues. That makes the wordfile sharing process much more difficult because some of my colleagues simple require a completely different color scheme than most of us because of a different color perception. Nobody sees the world with the same eyes as the person next to him/her. For example a 50 year old person sees the same green shade different than a 20 year old person. That is normal. So sharing a color scheme is only possible within a group of persons having nearly the same color perception.

                    Well, it is partly also my fault. I could have contributed my thoughts during the beta test period instead of complaining now about the solution. But it was really impossible for me to get time to do some tests with the beta versions. (Now I would have some time, but it is too late.)

                    I'm thinking about suggesting following to IDM.

                    By default the color and font style settings are still stored in the INI file with [Language x Colors] with x is a number between 1 and 20. If a language definition in a wordfile does not contain /Colors = the color settings in the INI file are used for that language according to the language number in the wordfile.

                    So the at the moment useless language number in a wordfile containing only 1 language will become important again for associating the color scheme to this language. When a user modifies the color settings for that language, it modifies the color settings for all languages in all wordfiles using the some language number and not containing the color settings too. That would be 100% downwards compatible and additionally we would have the possibility to use the same language number in all wordfiles containing only 1 language and so automatically all languages would work with the same color set. That would be fine for me too because I also use only 1 color scheme for all 20 languages since years. So the language number would become a color scheme selection number. Different color schemes per language are often favored by HTML writers for the multiple languages in one HTML file. But that would be no problem with that color storing method.

                    But there is an additional checkbox in the syntax highlighting configuration dialog, named for example: Save color and style settings in the wordfile below the language drop-down list. If the user checks that option, UltraEdit copies the current color and style settings from memory of the configuration dialog (= from the INI, if not already modified or not already loaded from the wordfile) into the wordfile and every modification on the color and style settings are done now only in the wordfile, not in the INI file. When a wordfile is loaded which contains /Colors =, this option is automatically checked.

                    Unchecking the option Save color and style settings in the wordfile eliminates all color settings in the wordfile for the currently selected language and UE reloads the color and style settings appropriate to the language number and display that settings in the configuration dialog. Well, checking/unchecking should not immediately result in changing the color settings in the wordfile. Instead UltraEdit would have to temporarily handle 2 color schemes for every language, one as stored in the INI file and one as stored in the wordfile (= same as INI file if nothing in the wordfile). Depending on the state of the option the user modifies the color and styles for the INI or the wordfile scheme for that language. When the user presses the Apply or OK button the necessary actions in the INI or wordfile are done - remove color settings from the wordfile and save the current settings for language x in the INI or let the settings for language x in the INI unmodified and save the color settings into the wordfile.

                    So with that method every user would have the total control over the color settings. A wordfile creator for a company can create wordfiles with or without the color settings stored in the wordfile and distribute it. If the wordfile does not contain color settings, the user controls with the color setting in his/her INI file how the language is highlighted. If the wordfile contains color setting, the user can keep the suggested color scheme from the wordfile creator, or uncheck the option and use his/her color settings for that language as he/she has configured and stored in the INI.

                    What do you think? Too complicated?
                    Best regards from an UC/UE/UES for Windows user from Austria

                    119
                    Power UserPower User
                    119

                      Apr 07, 2009#10

                      Mofi wrote:storing the color settings in the wordfile is a nightmare for me and my colleagues
                      I sympathize. I tend to think of the wordfiles as being user rather than group settings but I can see the appeal of having one person create a killer wordfile and sharing it. This would seem to be particular relevant to project wordfiles. I wonder if IDM was aware of your use case.
                      Mofi wrote:What do you think? Too complicated?
                      I think it's a clever hack which is both good and bad. Backwards compatibility carries baggage forward instead of allowing a clean implementation. I would rather see the language numbers (which seem to be pretty much obsolete now) go away instead of having them re-tasked to mean "color scheme." Admittedly they already meant that in a way but it was never exposed to end users. Advanced users such as you and I may have done some INI hacking to quickly replicate our color preferences but that's the exception not the rule. I particularly don't like the action at a distance that would result when changing the colors for a language who's number was shared.

                      I'd rather see a single clean, coherent design with a good and automated migration path. Shops that share wordfiles across multiple versions of UE would still have a problem but I'd rather pressure them to upgrade in lock-step than drive an accumulation of cruft back on everyone else.

                      One mechanism for a clean design would be to allow the user to define syntax highlighting color schemes (much like we can define general color schemes -- in fact it might be good to consolidate them) and associate each language with a particular scheme. That would make it easy to set your own "standard" colors that are shared across languages (subject to being consistent about what each /C section in the wordfile means). Each user would define their own color scheme so wordfiles could be shared or distributed without having to fuss over things that are purely personal taste. It would also make it clear that any changes to a scheme are global.

                      9
                      NewbieNewbie
                      9

                        Apr 07, 2009#11

                        I have upgraded to 15 also and working to set the color scheme in the word files.

                        One suggest that our group came up with is to have an ".UEC" for each ".UEW". The "UEC" file would be the same name as the wordfile and would contain the color definition. This would mean two files per wordfile but it would allow the sharing of wordfiles ("UEW") without have to change the color scheme if someone had a different color scheme than the wordfile author.

                        This would not solve the default color scheme but there could be a "default.uec" that could be used if there was not a corresponding "UEC" file for an "UEW" file.

                        In fact, the way we work, the default would work for 90% of the wordfiles we use. My guess it would be true for most everyone else.

                        6,605548
                        Grand MasterGrand Master
                        6,605548

                          Apr 08, 2009#12

                          The approach with UEC files sounds very good. That would make it possible for every user to easily use the color scheme of the wordfile author or use one of the own color schemes for a wordfile. Of course if the wordfile contains several languages like my project specific wordfiles than the UEC file would need also several color schemes for every language in the wordfile or default.uec is used for every language without an associated color scheme in the UEC file or if the UEC file does not exist at all.

                          The reference between a language in the wordfile and its color scheme in the UEC file could be done via the language name. Changing the language name in the wordfile would require also changing it in the UEC file, but that should be no problem. Language names of existing wordfiles are rarely changed. Of course UltraEdit should not require a language name for a color scheme in the UEC file if the wordfile contains only 1 language. I would not like the need to modify a copy of "MyScheme1.uec" to "c_cplusplus.uec" if only 1 language is in "c_cplusplus.uew". So the language name in the UEC file for a wordfile should be required only when the wordfile contains more than 1 language otherwise the first and probably only color scheme in the corresponding UEC file is asscociated to every language in the wordfile where a color scheme with the same language name is not found in the corresponding UEC file.

                          Hm, could work quite good and is easier to understand and manage for the users as my approach. It solves also the problem with updates of the standard wordfiles of UltraEdit. During the update from v15.00.0.1033 to v15.00.0.1034 three of the 13 standard wordfile were updated too. There was no warning message nor was the backup dialog for the wordfiles displayed on first start after the update. UltraEdit simple copied the wordfiles from the UE program subdirectory wordfiles to wordfiles directory in %appdata%\IDMComp\UltraEdit\. If I would have used that wordfiles and they would have contained also my preferred color schemes, I would have lost my settings, not very good. I think, the update mechanism of the standard wordfiles is not working correct at the moment (or exactly since UE v14.20 and UES v9.00 - documented in the meantime in the readme of this forum). I will report this. Using UEC files would always prevent the color and style settings of the user for the standard wordfiles. The more I think about the UEC files approach, the more I like it.
                          Best regards from an UC/UE/UES for Windows user from Austria

                          2362
                          MasterMaster
                          2362

                            Apr 08, 2009#13

                            I assume that once we have our colors safely in the wordfiles for version 15, we can safely remove that information from our INI file, as it would no longer be needed?
                            “Don’t document the problem, fix it.” – Atli Björgvin Oddsson

                            9
                            NewbieNewbie
                            9

                              Apr 08, 2009#14

                              We have one or two people who maintain the wordfiles. We then update the wordfile for everyone else. If the colors were in a separate file then the wordfile could be updated by us (or IDM) without causing the colors to change.

                              I think the key is the having an updated wordfile and not having everyone who uses a different color scheme making a change to the colors each time the wordfile is updated. This would allow a push of the updated wordfile or even a download of a wordfile without having to do anything else.

                              119
                              Power UserPower User
                              119

                                Apr 08, 2009#15

                                I briefly thought about using separate color files and decided I didn't like it. One problem is where do they live? Putting them in the same directory as the wordfiles defeats the purpose of splitting color off in the first place. Putting them anywhere else means having another configuration option and the overhead of keeping files in two locations in sync.

                                I also like the idea of having common color schemes that can be shared across languages. I don't want to redefine the comment color for every language! The UEW/UEC model doesn't seem to support this (and would probably get very messy if it did).

                                That's why I proposed defining color schemes (which could remain in the INI) and associating each language with a scheme.

                                Read more posts (9 remaining)