Tapatalk

Make a UEW file default to its own language type

Make a UEW file default to its own language type

691
Advanced UserAdvanced User
691

    Dec 15, 2018#1

    I am always
    1. Opening a uew file.
    2. Going Coding tab > View as Language > Selecting the Language for the UEW file I have opened.
    3. Do whatever I want to do in the UEW file.
    Is it possible to make the UEW file default to it's own language?
    For instance I open xmlschema.uew.
    I want it to have it's own language defaulted so I can see the colors, etc.

    Hope this makes sense....

    6,685587
    Grand MasterGrand Master
    6,685587

      Dec 16, 2018#2

      The answer is: yes and no.

      The main goal of syntax highlighting a file is in my opinion to make it easier for the file writer to read correct written file content. So a *.uew file should be syntax highlighted with a language definition suitable for the syntax of the wordfile and not for syntax of the file for which this wordfile is designed for. For that reason *.uew files are syntax highlighted by default with the language IDM Wordfiles as defined in %APPDATA%\IDMComp\UltraEdit\wordfiles\wf.uew. There is no configuration setting to change the syntax highlighting behavior for *.uew files to syntax highlight each *.uew with the language definition as defined in the wordfile itself.

      It is possible to delete the wordfile wf.uew for syntax highlighting *.uew files or remove just UEW in first line of this wordfile to get no *.uew files highlighted anymore by default by any syntax highlighting language. Then the file extension UEW could be added temporarily to the *.uew file currently added like xmlschema.uew. This would result in highlighting the file xmlschema.uew itself like the other files syntax highlighted with the language defined in xmlschema.uew. But I think, this is not really advisable.

      The preferred method for creating/editing wordfiles is as follows:
      1. Open one or even more files to syntax highlight with the syntax highlighting language defined in the wordfile to create/edit.
      2. On opened file(s) being already syntax highlighted as indicated in status bar, open Advanced - Settings or Configuration - Editor display - Syntax highlighting, click on button Open to open the wordfile containing the syntax highlighting language used to syntax highlight the active file and click on button Cancel to close the configuration dialog window.
        Otherwise on opened file not already syntax highlighted, open Advanced - Settings or Configuration - Editor display - Syntax highlighting, select a language which could be best for being used as template for creating a new wordfile for active file, click on button Open to open this wordfile, click on button Cancel to close configuration dialog window and use first Save As opened with key F12 to save this wordfile with a new file name into the configured wordfiles directory. Then change language name and file extensions (or file names) in first line and save the wordfile with Ctrl+S.
      3. Now with one or more files to syntax highlight and the wordfile which highlights those files being opened in same instance of UltraEdit/UEStudio, it is good practice to arrange the document windows of the files to see at least one syntax highlighted file and the wordfile in main window of UltraEdit/UEStudio above/below or side-by-side each other. I prefer the wordfile being displayed at top and the syntax highlighted file(s) at bottom of document window area. On large screens it could be more useful to have the wordfile displayed left and the syntax highlighted file(s) displayed right.
      4. UltraEdit and UEstudio update always immediately the display of the syntax highlighted file(s) every time the opened wordfile is saved with Ctrl+S after making modifications. So the effect of (nearly) every modification in wordfile can be immediately seen after saving the modified wordfile. In case of the result is not as expected, Ctrl+Z can be pressed one or more times to undo the latest modification(s) in wordfile and then make other modifications which are applied to syntax highlighted file(s) after next save of wordfile with Ctrl+S.
      5. Some features defined in wordfile require a complete re-parsing of a syntax highlighted file like the regular expressions in wordfile for function list or the code folding definitions. In this case it is necessary to switch with Ctrl+TAB or Ctrl+F6 to syntax highlighted file and use command Revert to saved in menu/ribbon File to reload the syntax highlighted file which triggers re-parsing of this file for function list and code folding. Pressing the key F8 with syntax highlighted file being active file results also in re-parsing the active file with updated regular expressions in wordfile and getting the items in Function List updated.
      So I don't see a good reason for syntax highlighting the currently edited wordfile with the syntax highlighting language defined in this wordfile. Please take into account that strings in wordfile can be very easily copied and pasted also into a syntax highlighted file being displayed above/below/right/left to the wordfile to see how these strings are highlighted with saved wordfile.
      Best regards from an UC/UE/UES for Windows user from Austria

      691
      Advanced UserAdvanced User
      691

        Dec 16, 2018#3

        Thank you as ever Mofi.
        Being able to avoid closing and reopening a highlighted file would be useful too.
        There it looks like there are additional features available in syntax highlighting now that I will go and read up on.
        Thank you.

          Jan 05, 2019#4

          Upon closer reading of Mofi's post I see reference to the wordfile UEW file. (wf.uew)
          I dont have a copy for whatever reason in my appdata..... location.
          Would anyone mind posting a copy here?
          Much appreciated....

          6,685587
          Grand MasterGrand Master
          6,685587

            Jan 05, 2019#5

            The *.uew files in wordfiles subdirectory in installation/program files directory of UltraEdit are always installed new on installing a newer version of UE/UES over an older version. But a copy of %ProgramFiles%\IDM Computer Solutions\UltraEdit\wordfiles (default installation path for 64-bit UltraEdit on 64-bit Windows and 32-bit UltraEdit on 32-bit Windows) or %ProgramFiles(x86)%\IDM Computer Solutions\UltraEdit\wordfiles (default installation path for 32-bit UltraEdit on 64-bit Windows) to %APPDATA%\IDMComp\UltraEdit\wordfiles is only made by UltraEdit on startup if the directory %APPDATA%\IDMComp\UltraEdit\wordfiles does not exist. This is necessary to keep the user's customization like deletion of wordfiles never needed to speed up start of UltraEdit, additional wordfiles installed by the user, customizations made by the user on used wordfiles.

            After an upgrade it is advisable to compare the two wordfiles directories and either copy one or more *.uew files completely from wordfiles subdirectory in program files directory of UltraEdit to the wordfiles directory as displayed in configuration dialog Advanced - Settings or Configuration - Editor display - Syntax highlighting or just merge some differences between last installed and currently used wordfile into the used wordfile in case of having made customizations before on a used wordfile which should be kept.

            So you should have a wf.uew suitable for your version of UltraEdit in wordfiles subdirectory in UltraEdit program files directory which justs needs to be copied into the wordfiles directory read in by UltraEdit on startup.
            Best regards from an UC/UE/UES for Windows user from Austria

            691
            Advanced UserAdvanced User
            691

              Jan 06, 2019#6

              It is not here
              C:\Program Files\IDM Computer Solutions\UltraEdit\wordfiles; nor
              C:\Program Files (x86)\IDM Computer Solutions\UltraEdit (no wordfiles subdirectory; have never used x86 version on this machine); nor
              %APPDATA%\IDMComp\UltraEdit\wordfiles; nor
              D:\Data\UltraEdit\Wordfiles (This has been my configured WF directory for well over 10 years.)

              I don't really want to run an installation.
              Is it not possible for you to attach one to this blog?

              6,685587
              Grand MasterGrand Master
              6,685587

                Jan 06, 2019#7

                There was a ZIP file created by me containing the wordfile for syntax highlighting wordfiles and a readme file available for download three years ago on the wordfiles download page. But it looks like IDM Computer Solutions, Inc. removed this ZIP file. However, I had archived it and updated it today. Here is the updated version of wordfiles.zip. Please take a look on readme text file for details.
                wordfiles.zip (4.97 KiB)   27
                ZIP file containing wordfiles.uew and wordfiles_readme.txt updated on 2019-01-06.
                Best regards from an UC/UE/UES for Windows user from Austria

                691
                Advanced UserAdvanced User
                691

                  Jan 07, 2019#8

                  Thanks Mofi appreciate that...