by Mofi » Wed Aug 06, 2008 10:49 am
Are you talking about preprocessor directives or statements/keywords? In some languages IF - ENDIF are statements/keywords, in other languages these are preprocessor directives.
However, you can use Search - Match Brace to find the matching statement/keyword/directive. You just have to add these 2 words to the list of open and close brace strings in your syntax highlighting wordfile for the language used to highlight your source files.
Open Advanced - Configuration - Editor Display - Syntax Highlighting and press the button Open right to the file name of the syntax highlighting wordfile you currently use, if you don't have open a project with a project specific wordfile. Close the configuration dialog with button Cancel.
Find the line which starts with /Lx"..." with x is a number in the range of 1 ... 20 and "..." is the name of the language you see in the status bar at bottom of the UltraEdit window or in menu View - View As (Highlighting File Type) when one of your source file is the active file.
Between this language definition line and the line starting with /C1 you should see something like following:
/Open Brace Strings = "{" "(" "["
/Close Brace Strings = "}" ")" "]"
If you can't see these lines, insert them above the line starting with /C1. Next modify it to:
/Open Brace Strings = "{" "(" "[" "IF"
/Close Brace Strings = "}" ")" "]" "ENDIF"
Save the wordfile and you can immediately test, if command match brace now works for IF - ENDIF too.
Additionally I suggest to specify IF and ENDIF also as code folding keywords.
/Open Fold Strings = "IF"
/Close Fold Strings = "ENDIF"
or maybe even better
/Open Fold Strings = "IF" "ELSE"
/Close Fold Strings = "ELSE" "ENDIF"
Now you can easily fold (make hidden) all lines between matching IF - ELSE, ELSE - ENDIF and IF - ENDIF statements/keywords/directives.
For more details see in help of UltraEdit the page about syntax highlighting and the readme topic in the syntax highlighting forum.