Bracket matching in DocBook and other text-centric formats

Are you missing a feature? Request its implementation here.
philws
Posts: 4
Joined: Tue Aug 19, 2008 1:51 pm

Bracket matching in DocBook and other text-centric formats

Post 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.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

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

Post 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
philws
Posts: 4
Joined: Tue Aug 19, 2008 1:51 pm

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

Post 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.)
Post Reply