Manual update of old wordfile results in file extension not recognized and highlighting not automatically set (solved)

Manual update of old wordfile results in file extension not recognized and highlighting not automatically set (solved)

8
NewbieNewbie
8

    Nov 27, 2017#1

    Hi,

    I've just figured out that I probably need to have individual .uew files per language in %APPDATA%\IDMComp\UltraEdit\wordfiles now. So I copied sections from my old %APPDATA%\IDMComp\UltraEdit\wordfile.uew into distinct files in directory %APPDATA%\IDMComp\UltraEdit\wordfiles and reloaded that from the settings. Languages appear as copied. But when I load a file with an extension as defined in the first line of such a .uew file, syntax highlighting is not applied automatically and I need to manually switch from No highlighting to my language. (Everything works okay for pre-installed common languages.)

    Here's the first line of my custom .uew file:

    Code: Select all

    /L26"GSAK Macro" Line Comment = #  Block Comment On Alt = <Data Block Comment Off Alt = Data> File Extensions = GSK
    Obviously, the files I'm loading do have the .gsk extension. This was working properly in my previous UE version, which I think was 20.x or maybe a bit lower.

    Any ideas?

    6,686585
    Grand MasterGrand Master
    6,686585

      Nov 28, 2017#2

      I downloaded ZIP file with the wordfile being deleted in the meantime and used your wordfiles as well as the example *.gsk file. Thanks.

      I could quickly see the reason for the problem: The wordfiles ahk.uew, gsak.uew, qrl.uew and tdl.uew are UNIX files, i.e. the lines are ending only with line-feed instead of carriage return + line-feed as DOS/Windows files use as line ending. The wordfiles must be DOS/Windows files.

      These 4 wordfiles are in the attached and in the meantime deleted ZIP file with:
      • conversion from UNIX to DOS;
      • executing macro SettingsDelAll on all of them;
      • executing macro SortLanguage on all of them;
      • executing macro TestForDuplicate on all of them removing some duplicates;
        (It was interesting for me to see that there is a false positive on two substring definitions on wordfile gsak.uew.)
      • executing macro TestForInvalid on all of them;
      • executing macro SortDelimiters on all of them.
      Those macros, with the exception of the last one, can be found in the macro file in the ZIP file which can be downloaded from the ultimate syntax highlighting tools. I may further look on these four wordfiles on next weekend and let you know if I find more to fix/improve.
      Best regards from an UC/UE/UES for Windows user from Austria

      8
      NewbieNewbie
      8

        Nov 29, 2017#3

        Great, thanks a lot for the quick help!

        6,686585
        Grand MasterGrand Master
        6,686585

          Dec 02, 2017#4

          I have looked more deeply on the four non standard wordfiles and improved them further, see attached ZIP file with once more improved wordfiles.

          The changes documented below with color maroon have no real effect for syntax highlighting or related features.
          The red formatted changes have an effect on syntax highlighting or related features and should be verified by you or someone else with knowledge about those four languages. Please note that I know nothing about syntax of those four languages and so my changes are mainly best guesses.

          ahk.uew
          1. Moved block comment definition in first line after line comment definition.
          2. Added DisableMLS to disable multi-line string highlighting.
          3. Converted file extension ahk to upper case. File extensions are interpreted by UltraEdit always case-insensitive and usually defined in upper case in the wordfile.
          4. Moved function strings block upwards in the wordfile.
          5. Merged function strings 3 and 4 together using an UltraEdit OR expression for faster searching through AHK files by reducing the number of UltraEdit regular expressions by one.
          6. Moved space in last function string expression to right to have this space not in function list.
          7. Added open/close brace strings.
          gsak.uew
          1. Replaced language number 26 by 20 as this is the highest supported number of languages in a single wordfile. Nowadays with *.uew files in a wordfiles directory this number has no meaning anymore. There is no language limit anymore.
          2. Added String Chars = "' DisableMLS to define explicitly the string highlighting instead of using the defaults.
            It might be necessary to add also Escape Char = \ left to String Chars = if GSAK macro language syntax defines an escape character.
          3. Added line defining the word delimiters for not depending on internal defaults.
          4. Moved open/close brace strings downwards in the wordfile and removed one unnecessary space character.
          5. Moved function string line upwards in the wordfile.
          6. Removed A-Z in function string as the regular expression searches are executed always case-insensitive.
          7. Replaced ^p by $ in function string as the line ending should be never matched too (which caused line positioning troubles in the past).
          8. Removed language keyword STYLE_FUNCTION because this keyword is interpreted only by UEStudio and only for certain languages.
          9. Removed some operator combinations being invalid "words" after adding the delimiters.
          qrl.uew
          1. Added DisableMLS to disable multi-line string highlighting without really knowing if that is right for QRL syntax.
          2. Sorted the file extensions alphabetically.
          3. Moved function string line upwards in the wordfile.
          4. Removed A-Z in function string as the regular expression searches are executed always case-insensitive.
          5. Added escaped parentheses to define a tagging group which prevents getting displayed in function list everything after closing parenthesis.
          6. Moved open/close fold strings downwards in the wordfile.
          7. Added open/close brace strings.
          8. Added a name for color group 5 being useful on customizing color/font style for this color group in Manage Themes dialog.
          tdl.uew
          1. Added DisableMLS to disable multi-line string highlighting without really knowing if that is right for TDL syntax.
          2. Added names for the color groups 1, 2 and 5 being useful on customizing color/font style for these color groups in Manage Themes dialog.
          It would be good to add suitable names also for color group 3 and 4. And it would be perhaps also good to add indent/unindent strings, open/close brace strings, open/close fold strings and perhaps also function strings if some of them makes sense for TDL language which I don't know.
          fixed_wordfiles_v2.zip (8.5 KiB)   92
          This ZIP file contains fixed and improved ahk.uew, gsak.uew, qrl.uew and tdl.uew.
          Best regards from an UC/UE/UES for Windows user from Austria

          8
          NewbieNewbie
          8

            Dec 05, 2017#5

            Mofi wrote: I have looked more deeply on the four non standard wordfiles and improved them further, see attached ZIP file with once more improved wordfiles.
            Wow, thanks a lot, I'll have a look as soon as I'll work with one of these files types again!