How can I configure the new Delphi XE8 Editor begin-end visual cues?
Asked Answered
R

3

12

The Delphi XE8 editor has visual cues so that you know which begin goes with which end. In our team, we have the convention of always put the begin on the same line as the owner clause.

Is there any way to have the visual cue aligned with the corresponding end instead of its begin?

Screenshot

UPDATE: This issue seems to be fixed in Delphi Seattle 10.

Rowles answered 8/4, 2015 at 14:11 Comment(14)
OMG, what a shocker!!!!!!! Just when I though I could not be surprised by the quality of the software that comes out of Emba.......Translucent
@TLama I really hope that they don't bring all the instability of Castalia, as well as it's lame understanding of code formattingTranslucent
Doesn't Embarcadero have better things to do? They could have accomplished something much better and more flexible by just highlighting begin and end rather than blindly drawing a line which means nothing. I'm still waiting to be able to highlight a variable and have the code editor highlight all other instances of the same variable - etc.Octarchy
That's Castalia. Obviously nobody bothered to fix such crap (pardon my expression, but this is a long standing problem with Castalia and one of the reasons why I hate it).Dismantle
harsh comments..if you don't like Castalia, turn it off..Thurmond
@John I'd like a function like this, but only one that painted sane lines. These ones are bonkers. CnPack can get this right. I'm paying for this functionality. I'd like it to work well.Translucent
CodeRush had a nice implementation that supported many code styles.. sad when it went away..Thurmond
I think this "convention" is bad, reading the code is bad and the code becomes ugly. You already have an answer bellow, but i would try to change de "convention", just because its Delphi and the real convention is not begin in the same line of owner clause.Knackwurst
Please do not try to ascribe anything the label of "real convention," @Opsdcadarn. Plenty of code that ships with Delphi uses "K&R" style begin-end locations. Delphi and Pascal are not exclusively "Allman" style. There are multiple legitimate styles in Delphi, and any tool that only accommodate one is shortsighted, at best, especially if it's bundled by the IDE vendor.Discontinuous
@Rob, as well as you can write all your code on a single line and blame the IDE for improper structure highlighting while we are at. Object Pascal Style Guide clearly says, never place a begin statement on the same line with any other code. If you don't take that style as a reference is upon you.Factfinding
@Factfinding - There's not much point in referring to the 'style guide' you linked without emphasizing why it should be definitive.I don't see a single reason why anyone should be compelled to adhere to that style except for perhaps the fact that the document calls itself standard, which I find quite arrogant.Seraphic
@Sertac, true, but if there is no official style specification, then why not take that one as standard. Major part of the Delphi source uses it.Factfinding
Simple answer - change your convention!Hesson
@SertacAkyuz It's the standard. All the source code on Delphi VCL adheres to that style guide. And JEDI style guide is just an variant of OPSL.Moncear
S
15

Go to Castalia Options - Editor - Smart Highlighting. Set Structural highlighting mark hanging blocks to No

Sakovich answered 8/4, 2015 at 14:48 Comment(0)
O
6

This is not an answer but I think it's worth sharing - CNPack's corresponding block highlighting can get this right, see screenshot below:

enter image description here

Overreact answered 20/4, 2015 at 3:8 Comment(0)
S
0

= reported ====================================== http://qc.embarcadero.com/wc/qcmain.aspx?d=131086

Scevor answered 21/4, 2015 at 8:56 Comment(1)
Note that QualityCentral has now been shut down, so you can't access qc.embarcadero.com links anymore. If you need access to old QC data, look at QCScraper.Champlain

© 2022 - 2024 — McMap. All rights reserved.