by Mofi » Mon Feb 06, 2006 5:01 pm
Yes and no. You could modify the open and closing brace strings in the wordfile for the XML language. Example:
/Open Brace Strings = "{" "(" "[" "<name>" "<"
/Close Brace Strings = "}" ")" "]" "</name>" ">"
Don't know if this really works. I have not tested it. But I think you will have problems with a big number of tags for brace matching.
But something similar to match brace can be done with a macro. Let's say you have set the cursor anywhere inside start tag "name". The macro selects the current word and searches for the ending tag with or without selection of the whole text between the 2 tags. Disadvantage of the macro solution: the cursor is set to end of the closing tag and it does not work for nested tags.
Macro to find end tag with selection:
ColumnModeOff
HexOff
SelectWord
Find MatchCase Select "</^s>"
Macro to find end tag without selection:
ColumnModeOff
HexOff
SelectWord
Find MatchCase "</^s>"
Macro to find start tag with selection:
ColumnModeOff
HexOff
SelectWord
Find MatchCase Up Select "<^s>"
Macro to find start tag without selection:
ColumnModeOff
HexOff
SelectWord
Find MatchCase Up "<^s>"
It's possible to improve this quick and dirty macros and create only 1 macro, with works for start and end tag automatically by detecting on which tag the cursor is currently set. And it could be also modified to allow the cursor to be set on < or / or > and it nevertheless finds the "matching" tag.