How to configure default SQL highlighting on using more than 1 wordfile for SQL highlighting?

How to configure default SQL highlighting on using more than 1 wordfile for SQL highlighting?

231
Basic UserBasic User
231

    Feb 02, 2017#1

    Hello

    I can't find the answer to my problem on the forum or in the readme.

    I work with both Transact-SQL and MySQL, and have the tsql.uew and mysql.uew wordfiles installed. I need to use the .SQL extension for both. When I open a SQL file it opens with highlighting as MySQL by default, but I want Transact-SQL highlighting by default.

    Anyone know how to do this?

    Thanks!

    6,603548
    Grand MasterGrand Master
    6,603548

      Feb 02, 2017#2

      Open Advanced - Settings/Configuration - Editor Display - Syntax Highlighting, select wordfile MySQL and click on button Open, select wordfile Transact-SQL and click again on button Open, close configuration with button Cancel.

      In wordfile with MySQL language definition remove from first line the file extension SQL, save and close the wordfile.

      In wordfile with Transact-SQL language definition make sure it contains the file extension SQL (interpreted not case-sensitive), if necessary save modified wordfile and close the wordfile.

      Restart UltraEdit and now *.sql wordfiles are by default syntax highlighted according to Transact-SQL.
      Best regards from an UC/UE/UES for Windows user from Austria

      231
      Basic UserBasic User
      231

        Feb 02, 2017#3

        Thanks Mofi, I thought I still needed to have the SQL extension in the MySQL wordfile, as I need to edit MySQL files, but I can see now that I can select MySQL from Coding > View as language and it will accept the syntax highlighting when editing a MySQL file, even though SQL is not now in the MySQL.uew file.

        6,603548
        Grand MasterGrand Master
        6,603548

          Feb 02, 2017#4

          You can also select the syntax highlighting to use for active file via the list item in status bar at bottom of main window if you are not using the basic status bar which just indicates the active syntax highlighting for text at position of caret in active file.
          Best regards from an UC/UE/UES for Windows user from Austria

          231
          Basic UserBasic User
          231

            Feb 03, 2017#5

            Oh yes, one less click is always good! Thanks!