Tapatalk

Automatic brace matching doesn't appear to work (solved)

Automatic brace matching doesn't appear to work (solved)

3
NewbieNewbie
3

    Mar 23, 2015#1

    Greetings and salutations!

    I'm just starting out with UltraEdit, so I apologize for my inexperience here. This may be a mind-numbingly easy question, but the solution escapes me.

    I'm using UltraEdit Professional - Version 21.30.0.1024
    UE help wrote:UltraEdit will automatically highlight a matching bracket/brace if the match is in view when this cursor is positioned to the right or left of a bracket/brace. No screen positioning will be performed, the bracket/brace will only be highlighted if it is in view.
    I ensured that Enable auto-brace matching and Brace matching in comments are both checked in the Configuration options under Editor Display - Brace Matching.

    But when I am cursoring through source code, it definitely does not highlight any matching bracket or brace unless I use Ctrl+B.

    What am I missing?

    Thanks for your help!
    DaveSlash

    6,685587
    Grand MasterGrand Master
    6,685587

      Mar 23, 2015#2

      First, I suggest to open View - Themes - Manage Themes, select tab Editor and look on foreground and background color of list item Brace Highlight. Perhaps the colors are not good configured for the theme you use.

      Second, brace highlighting works only for files syntax highlighting with a syntax highlighting language defined in a wordfile containing the lines:

      Code: Select all

      /Open Brace Strings = "{" "(" "["
      /Close Brace Strings = "}" ")" "]"
      You can verify that by opening a source file on which you want to see brace highlighting, then open Advanced - Configuration - Editor Display - Syntax Highlighting and click on button Open right to installed wordfiles list item hopefully showing a language name, close the dialog with Cancel and look on first line of the opened wordfile for those 2 lines.
      Best regards from an UC/UE/UES for Windows user from Austria

      3
      NewbieNewbie
      3

        Mar 23, 2015#3

        Thank you for your quick response, Mofi. I greatly appreciate it.

        As you suggested, I checked the color themes under Brace Highlight, and I even changed them to a bright red, just to make absolutely sure I wouldn't miss it.

        Also, I checked the Syntax Highlighting portion of the Configuration dialog. Currently the full directory path for wordfiles is:

        Code: Select all

        C:\Users\*******\AppData\Roaming\IDMComp\UltraEdit\wordfiles
        ... and the Installed wordfiles has none selected, but there are 14 options from which I can select (C#, CSS, C/C++, etc.).

        The file I am editing is SQL source code, but there's no option for that in the drop-down list box.

        Just for kicks, I tried cursoring through my source code again, and it's still not highlighting of any matching braces unless I press Ctr+B. Fortunately, that does work, but I think (according to the help text), it should be able to match the braces automatically.

        Thanks again for your help!

        6,685587
        Grand MasterGrand Master
        6,685587

          Mar 24, 2015#4

          Brace highlighting is enabled only with syntax highlighting active for the active file. As your SQL file is not syntax highlighted at all, this feature is also not active.

          By default there is mysql.uew installed with syntax highlighting language name MySQL 5.1. This wordfile becomes active automatically for any file with file extension SQL (case-insensitive). It looks like your SQL file has a different file extension.

          Open Advanced - Configuration - Editor Display - Syntax Highlighting, select MySQL 5.1 from the installed wordfiles list, then click on button Open to open this wordfile. Close the configuration dialog with button Cancel. Append at end of first line in opened mysql.uew the file extension of your SQL files, save and close the wordfile.

          Restart UltraEdit and your SQL file should be now syntax highlighted and brace highlighting should be also active now.

          Which syntax highlighting is active for the active file respectively section at current caret position in active file is displayed always in status bar at bottom of UltraEdit main window. No Highlighting means no syntax highlighting active. Syntax highlighting can be changed in status bar (except when using basic status bar) or via View - View as (Highlighting File Type). But best is to configure the used syntax highlighting languages right for the usually edited or viewed files as described above.

          Downloads - Extras - Wordfiles contains lots of user-contributed wordfiles for various languages if you need more than what is installed by default. By the way: Deleting the *.uew files surely never used by you in directory %APPDATA%\IDMComp\UltraEdit\wordfiles with Windows Explorer or any other file manager lets UltraEdit start a little bit faster. The wordfiles here are just a user account specific copy of the wordfiles subdirectory in program files directory of UltraEdit. So it is always safe to delete wordfiles never used as in wordfiles subdirectory of program files directory of UltraEdit are the originals in case of things change and suddenly one more wordfile is needed installed by default.

          The syntax highlighting colors for all used languages or for a specific language can be customized also in the Manage Themes dialog on third tab.
          Best regards from an UC/UE/UES for Windows user from Austria

          3
          NewbieNewbie
          3

            Mar 24, 2015#5

            Perfect. That worked beautifully. Thank you!