Inline code in the docs - the correct way

Jonathan M Davis newsgroup.d at jmdavisprog.com
Thu Feb 1 03:27:12 UTC 2018


On Wednesday, January 31, 2018 18:58:29 Walter Bright via Digitalmars-d 
wrote:
> On 1/31/2018 5:37 PM, Steven Schveighoffer wrote:
> > Where it breaks down is when you have many nested tags, and you end with
> > )))))
> Long ago, I adjusted my text editor so that when the cursor is placed on
> ), the matching ( is found. Ditto for { }, [ ], < >, and
> #if/#elif/#else/#endif (!). It's been incredibly convenient.
>
> With Ddoc, I do this at the opening (, and see if the matching one is the
> closing ). If not, surprisingly, the match shown is the one that is
> erroneous.
>
> https://github.com/DigitalMars/med/blob/master/src/med/search.d#L453

vim does that and it's invaluable. It also makes it easy to hop between
matching parens or braces, which is part of what drives me nuts about
python. Because it doesn't have braces, it's harder to hop to the opposite
end of a block.

Now, I think that it's still problematic when you end up with a bunch of
parens in a row, since you tend to have to put your study it and put your
cursor on each paren to understand what you're looking at, but having that
highlighting definitely helps.

- Jonathan M Davis



More information about the Digitalmars-d mailing list