There is no such feature in UltraEdit for Windows v14.00. UltraEdit is a general text editor and not an editor specific written for editing HTML files. If the HTML file is well structured (not everything is on the same line) and you have code folding enabled, you can fold a
div block to see where the matching
</div> is. You can use
HTML Tidy to reformat your HTML file to get a good structure.
If this is still not enough for you and you want the ultimate support as in real HTML editors, you can develop a script which searches for the matching tag. But this script would not be easy. Maybe there is anywhere a JavaScript which is exactly for that job and can be converted to work in UltraEdit.
What works is using the command
Search - Match Brace to select everything from
<div> to the matching
</div>. But only if you have in your syntax highlighting wordfile defined for "HTML":
/Open Brace Strings = "<h1>" "<div>" "<p>"
/Close Brace Strings = "</h1>" "</div>" "</p>"
But then only
<div>...
</div> are recognized and not
<div class="name
">...
</div>. Using
/Open Brace Strings = "<h1" "<div" "<p"
/Close Brace Strings = "</h1>" "</div>" "</p>"
does not work (UE v14.00b) and I don't know why it fails. I reported this issue to IDM.
With the working
<div> </div> brace strings the feature
auto-brace matching (syntax highlighting configuration dialog) highlights
< of matching
<div> or
> of matching
</div> depending on the caret position.
Edit: I found out 5 years later that a brace string definition like following makes a quite good job:
Code: Select all
/Open Brace Strings = "<a" "<acronym" "<b>" "<b" "<body" "<button" "<caption>" "<caption" "<dd>" "<dd" "<dir>" "<dir" "<div>" "<div" "<dl>" "<dl" "<dt>" "<dt" "<em>" "<em" "<font" "<form" "<frameset" "<h1>" "<h1" "<h2>" "<h2" "<h3>" "<h3" "<h4>" "<h4" "<h5>" "<h5" "<h6>" "<h6" "<head>" "<header>" "<i>" "<i" "<iframe" "<kbd>" "<kbd" "<li>" "<li" "<map" "<noframes>" "<noscript>" "<ol>" "<ol" "<option>" "<option" "<p>" "<p" "<pre>" "<pre" "<script>" "<script" "<select" "<small>" "<small" "<span" "<strong>" "<strong" "<style>" "<style" "<sub>" "<sub" "<sup>" "<sup" "<table>" "<table" "<td>" "<td" "<textarea" "<th>" "<th" "<title>" "<tr>" "<tr" "<tt>" "<tt" "<u>" "<u" "<ul>" "<ul" "<var>"
/Close Brace Strings = "</a>" "</acronym>" "</b>" "</b>" "</body>" "</button>" "</caption>" "</caption>" "</dd>" "</dd>" "</dir>" "</dir>" "</div>" "</div>" "</dl>" "</dl>" "</dt>" "</dt>" "</em>" "</em>" "</font>" "</form>" "</frameset>" "</h1>" "</h1>" "</h2>" "</h2>" "</h3>" "</h3>" "</h4>" "</h4>" "</h5>" "</h5>" "</h6>" "</h6>" "</head>" "</header>" "</i>" "</i>" "</iframe>" "</kbd>" "</kbd>" "</li>" "</li>" "</map>" "</noframes>" "</noscript>" "</ol>" "</ol>" "</option>" "</option>" "</p>" "</p>" "</pre>" "</pre>" "</script>" "</script>" "</select>" "</small>" "</small>" "</span>" "</strong>" "</strong>" "</style>" "</style>" "</sub>" "</sub>" "</sup>" "</sup>" "</table>" "</table>" "</td>" "</td>" "</textarea>" "</th>" "</th>" "</title>" "</tr>" "</tr>" "</tt>" "</tt>" "</u>" "</u>" "</ul>" "</ul>" "</var>"
There is only 1 problem with such a brace string definition: Most of the end tags are listed twice for same start tag.
That is necessary as most start tags can be without or with attributes and UltraEdit ignores
<td> if just
<td is defined as brace string in the wordfile.
The double usage of an end tag as close brace string for different open brace strings results in an incorrect match in some cases like in the example below:
Code: Select all
<table border="0">
<tr>
<td valign="top">Parameter: <strong>/A</strong></td>
<td>Lists files or directories with specified attributes.
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td valign="top" rowspan="5">Attributes: </td>
<td width="25">A</td>
<td>files to archive</td>
</tr>
<tr>
<td>D</td>
<td>directories</td>
</tr>
<tr>
<td>H</td>
<td>hidden files</td>
</tr>
<tr>
<td>R</td>
<td>read-only files</td>
</tr>
<tr>
<td>S</td>
<td>system files</td>
</tr>
</table>
- placed first reverts the meaning.
</td>
</tr>
</table>
Setting caret at beginning of line 4 and executing the command
Search - Match Brace respectively
Search - Select to Matching Brace results in selecting the text up to next
</td> on line 7 instead of the really matching end tag on line 29.
The reason is that
<td> on line 4 is without an attribute while the next
<td valign="top" rowspan="5"> is with attributes.
UltraEdit differentiates between
<td> and
<td according to the open brace strings definition, but both have
</td> as close brace. So the behavior is correct from the view of the match brace command, but is not correct for a "match tag".
The command
Search - Go to Matching Brace introduced with UltraEdit for Windows v17.10 and UEStudio v11.10 can be used also with those brace strings. The caret must be set at
< of start or end tag to set caret to
> of matching end tag in case of using the command on
< of a start tag or to set caret to
< of matching start tag in case of using the command on
< of an end tag.