Tip: Use Ctrl+W to select content in the IDE code editor.
Place your cursor some random piece of code, preferably deep in code that have nested blocks. Press Ctrl+W. Repeat, and repeat while watching the goodness progress.
This tidbit was shared by Jim Mack in a comment in the FB Delphi group.
Edit: The feature was introduced in Berlin 10.1
The feature struggles with Unicode characters in code and strings.
Those of you that use national characters in your strings or code (such as Cyrillic, Greek, or Chinese) that also misbehaves, should add a comment / example to the QP issue and vote on it.
awesome oO
LikeLike
Actually, not so many years. This shortcut was introduced only recently in Berlin.
LikeLike
Uwe Raabe Really? I got the impression it was older – but that could be just me and my imagination, of course. Anyways – best new shortcut ever!
LikeLike
Its one of the features of Castalia that were included since its acquisition.
LikeLike
Very handy feature. Thanks for pointing it out.
LikeLike
bmp.Canvas.FillRect(Rect(0,0,16,16));
I placed the cursor after the first “,” and it failed, just jumping to 16 and going back to the second 0.
LikeLike
Victor Alberto Gil Works perfectly over here.
LikeLike
Victor Alberto Gil
photos.google.com – New photo by Lars Fosdal
LikeLike
yup, just saw it on fb the other day too, together with the hand-breaker ctrl+alt+shift+nose+ear+p
LikeLike
Maybe something in my entire project affected it. I tried copying to another empty project and it worked perfectly.
https://plus.google.com/photos/…
LikeLike
Out of curiosity – how it works? I don’t have the latest Delphi…
LikeLike
Edwin Yip Have a look at the photo posted by Lars. Every Ctrl-W selects the next outer scope.
LikeLike
CTRL-W usually means “close current document/tab”.
But maybe CTRL-V to view the source of a .dpr is even weirder 🙂
LikeLike
Wouter van Nifterick never noticed it, it was always ctrl-f4 for me
LikeLike
Attila Kovacs that’s the CUA one that has worked since stone age. Most modern GUI developers don’t know about those. For instance at https://github.com/atom/atom/issues/11865
LikeLike
Victor Alberto Gil perhaps it is the dark theme, or do you have other plugins that grab the shortcut?
LikeLike
BTW, it is very nice in if clauses too.
LikeLike
Grrrr… I hate you now Lars Fosdal
I read this post yesterday and I just shrugged…
But today working all day in Seattle, I realized how often I would use it if it would be present…
I guess it’s especially useful when blocks are covering multiple lines when visually you lost track a little of which “begin” goes with which “end”, etc.
I wish GExperts would have something like that.
Thx for the info.
LikeLike
Cool feature, but doesnot support uncode
https://plus.google.com/photos/…
LikeLike
Евгений Савин Confirmed. It really loses it’s mind if there are Unicode characters in strings or variable names. That is not good.
LikeLike
Евгений Савин
Created a QP issue demonstrating the problem with Norwegian æøå letters.
Those of you that use national characters in your strings or code (such as Cyrilliic, Greek, or Chinese) that also misbehaves, should add a comment / example to the QP issue and vote on it.
quality.embarcadero.com – Log in – Embarcadero Technologies
LikeLike
Attn: Marco Cantù and David Millington
LikeLike
Lars Fosdal the problem in the IDE is that it is not Unicode aware it does just Unicode encoding.
The IDE should re-use the compiler for anything syntax related.
Better: the R&D team should contribute to DelphiAST so finally the syntax gets documented and any tool (not just the IDE or compiler) can use it.
(Both the use of the compiler and contributing the syntax to the public have been suggested many times over the past two decades).
LikeLike
Jeroen Wiert Pluimers That is an excellent idea!
LikeLike
Çxx xugz
LikeLike