Bug 112898 - Missing bracket matching support
Summary: Missing bracket matching support
Status: RESOLVED MOVED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks:
 
Reported: 2017-10-05 15:29 UTC by ask4support
Modified: 2020-07-02 15:38 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ask4support 2017-10-05 15:29:59 UTC
Description:
When working with many nested brackets, LibreOffice won't help me to know which closing bracket bracket matches the opening bracket near the cursor. 

Steps to Reproduce:
1. Make at least one pair of brackets. 
2. Move the cursor either towards the opening bracket or towards the closing bracket. 
3. No animation nor highlighting happens. 

Actual Results:  
Neither brackets nor the text between them is animated or highlighted in any way. 

Expected Results:
Option for transient animation of brackets or highlighting (of the text or brackets). 
(There may be an option to allow highlighting for as long as the cursor is between the two brackets.)


Reproducible: Always

User Profile Reset: No

Additional Info:
In Kate (KDE's built-in text editor) there is an option to animate (increase and gradual decrease of bracket's font size occurring only after moving the cursor immediately next to the bracket if it wasn't there already) and the text between bracket becomes highlighted. 

I'm sorry for my poor English, feel free to correct me if you don't mind. 



User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Comment 1 Dieter 2017-10-05 19:39:46 UTC
Don't know if this is possible => needsUXEval
Comment 2 V Stuart Foote 2017-10-05 21:00:39 UTC
Rather out of scope for editengine of any module of LibreOffice, perhaps as an Extension.

To me WONTFIX.
Comment 3 Samuel Mehrbrodt (CIB) 2017-10-06 07:39:02 UTC
I think this is a valid enhancement request, we do say that we have an integrated Basic IDE, why should we not support such a basic feature?
Comment 4 Samuel Mehrbrodt (CIB) 2017-10-06 07:39:47 UTC
(I guess this is for Basic IDE and not for documents ?! )
Comment 5 Heiko Tietze 2017-10-06 07:52:29 UTC
Out of scope in my opinion too, since Writer is neither a text editor like Kate nor meant for synatx highlighting (which is the use case I guess). => WF

If the target is Basic that's another question.
Comment 6 V Stuart Foote 2017-10-06 13:42:48 UTC
(In reply to Samuel Mehrbrodt (CIB) from comment #4)
> (I guess this is for Basic IDE and not for documents ?! )

Where we already provide the Find Parentheses button which: "Highlights the text that is enclosed by two corresponding brackets. Place the text cursor in front of an opening or closing bracket, and then click this icon." But, its .uno:MatchGroup() command looks to be available to edit engine in general [1][2].

Also have the input handler for Calc formulas where parenthesis bracket matched [3]

The logic for both is rudimentary. Calc auto-highlights matching parens, and for BasicIDE edit is limited to matching parens, braces, brackets with a button action toggle.  Could provide a similar button toggle for general text entry. But would not expect, nor want the matches enabled by default in the general UI.

Beyond that, an automated display during text editing would need either an Expert configuration stanza or an toggle entry in the Options -> View panel, or maybe the Wrtiting Aids -> Options panel

=-ref-=
[1] https://opengrok.libreoffice.org/xref/core/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu#1680

[2] https://opengrok.libreoffice.org/xref/core/vcl/source/edit/xtextedt.cxx#30

[3] https://opengrok.libreoffice.org/xref/core/sc/source/ui/app/inputhdl.cxx#1759
Comment 7 ask4support 2017-10-06 15:16:08 UTC
That's not for any IDE (I'm not a programmer, I can't fix any bug), actually I'm working on English text document where I sometimes use multiple nested definitions. 

So it is, indeed for a document.
Comment 8 V Stuart Foote 2017-10-06 16:44:23 UTC
OK -> NEW

@Samuel, can the uno:MatchGroup be adapted for use on the Writer canvas? And, activate as a button control as in the BasicIDE, or toggle on/off as a Writing Aid?
Comment 9 Heiko Tietze 2017-10-07 06:46:34 UTC
(In reply to ask4support from comment #7)
> That's not for any IDE (I'm not a programmer, I can't fix any bug), actually
> I'm working on English text document where I sometimes use multiple nested
> definitions. 
> 
> So it is, indeed for a document.

Still out of scope in my opinion. If we start with brackets someone asks about curly brackets, the next one about enclosing paragraph breaks, headings, etc. Can of worms to me and better realized per extension. => WONTFIX
Comment 10 Heiko Tietze 2020-07-02 15:38:12 UTC
We discussed the topic in the design meeting. It would be a nice addition but has low priority. Rather implementing a special function via code, the brackets could be a added to a (special) grammar checker. This extension is very welcome.