Page 1 of 1

Bracket matching in DocBook and other text-centric formats

Posted: Tue Aug 19, 2008 2:01 pm
by philws
Many IDEs and text editors provide the ability to perform bracket matching with both highlighting and input caret warping.

For example, if I had the following text in a table cell:

(device:getPolicy('DRM') = ('CD', 'SD') and exists(./rights)) or (not(exists(./rights)) and number(./width) <= device:getPolicy('pixelsx'))

It would be very useful to be able to see when I have correctly entered the right number of brackets (i.e. all brackets are balanced) - perhaps by highlighting any bracket paired with the open or close bracket next to the input caret.

It would also be very useful to be able to place the input caret after a close bracket (or before an open bracket) and be able to jump (or warp) the input caret to the matching open (or close) bracket, if any.

Re: Bracket matching in DocBook and other text-centric formats

Posted: Tue Aug 19, 2008 2:39 pm
by sorin_ristache
Hello,
philws wrote:It would be very useful to be able to see when I have correctly entered the right number of brackets (i.e. all brackets are balanced) - perhaps by highlighting any bracket paired with the open or close bracket next to the input caret.
This is already implemented in the Text mode of the XML editor. We will also implement it in the Author mode in a future version.
philws wrote:It would also be very useful to be able to place the input caret after a close bracket (or before an open bracket) and be able to jump (or warp) the input caret to the matching open (or close) bracket, if any.
I added this request to our internal system.


Thank you for your requests,
Sorin

Re: Bracket matching in DocBook and other text-centric formats

Posted: Tue Aug 19, 2008 3:36 pm
by philws
sorin wrote:
philws wrote:It would be very useful to be able to see when I have correctly entered the right number of brackets (i.e. all brackets are balanced) - perhaps by highlighting any bracket paired with the open or close bracket next to the input caret.
This is already implemented in the Text mode of the XML editor. We will also implement it in the Author mode in a future version.
Thanks, I didn't spot that since I use Author mode when writing DocBook so making this available in Author mode is pretty high on my wish list. (Apart from the need to press return and use the arrow keys a bit more than normal this mode is pretty close to a "normal" word processor in capability and user experience.)