Jump to content
Zazhir

Select multiples lines at once

Recommended Posts

In visual code, we have the option do press 'alt' and click in differents line, the IDLE will put a cursor n wich line selected.

Whats the shortcut to this same action in Delphi Embarcadero? if theres a one....

Edited by Zazhir

Share this post


Link to post

in Delphi, you can use "Ctrl+A" = select all, or just select your text or lines, "Ctrl+Shift+J" to browse into this selection (you can replace your text like a "refactoring") ...

  • Shift+Click = cursor in any line selected
  • just clicking with mouse undo the "selection"

On Tools options, you can use VS Studio emulation keyboard mapping

Edited by programmerdelphi2k

Share this post


Link to post
2 minutes ago, programmerdelphi2k said:

in Delphi, you can use "Ctrl+A" = select all, or just select your texto or lines, "Ctrl+Shift+J" to browse into this selection (you can replace your text like a "refactoring") ...

  • Shift+Click = cursor in any line selected
  • just clicking with mouse undo the "selection"

Shift+Click select the text until the place that i click, what I want is a shortcut to put a cursor in multiples lines, to edit than at same time 

 

Share this post


Link to post

is not the same than "Ctrl+Shift+J" ?  here you can edit all similar text into our selection, in the same time!

  • ex. if exist many world "hello" in your selection, then, change any one, will change all others in the same time!

Share this post


Link to post
Just now, programmerdelphi2k said:

is not the same than "Ctrl+Shift+J" ?  here you can edit all similar text into our selection, in the same time!

  • ex. if exist many world "hello" in your selection, then, change any one, will change all others in the same time!

Not the same. For ex. I want to put a UpperCase method in the begging of every qryFieldbyName(...).asString... But theres diferrents qrys, so thats not going to "work" for this case

 

Share this post


Link to post
Just now, programmerdelphi2k said:

understood now! (if said on first post... 🙂 

Ctrl+Shift+J is just for "similar TEXTs"  (not "." "( )" etc...)

but was exacly what i said at first 🤨

Share this post


Link to post
29 minutes ago, Zazhir said:

we have the option do press 'alt' and click in differents line, the IDLE will put a cursor n wich line selected.

"PUT a cursor n wich line selected"  --> not "edit all lines" 

 

try o CnPack or GExpert plugins!

Edited by programmerdelphi2k
  • Sad 1

Share this post


Link to post

Multi Caret 

 

like this... I think that RAD IDE does not do it, then you needs  a external plugin as I said above

yWIwr.gif

Quote

https://stackoverflow.com/questions/30037808/multiline-editing-in-visual-studio-code

remarks... Note that third-party software may interfere with these shortcuts, preventing them from working as intended (particularly Intel's HD Graphics software on Windows; see comments for more details).

 

in Lazarus you have it, in Delphi not!

https://wiki.freepascal.org/New_IDE_features_since#Multi_Caret

 

multicaret.gif

Edited by programmerdelphi2k
  • Like 2

Share this post


Link to post
12 hours ago, programmerdelphi2k said:

"PUT a cursor n wich line selected"  --> not "edit all lines" 

 

try o CnPack or GExpert plugins!

GExperts does not have this functionality.

Share this post


Link to post
4 hours ago, dummzeuch said:

I'm sure I saw a similar functionality demonstrated in the Delphi IDE. Was it called SyncEdit?

 

https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Sync_Edit_Mode_(Delphi,_C++)

 

An older version of the documentation links to a video:

 

But that's only for identifiers, not for generic text.

Man, this kind what I was looking for!!! Supper useful! Thanks for the help. best regards, Zazhir

Share this post


Link to post
1 hour ago, programmerdelphi2k said:

@Zazhir  this is the "Ctrl+Shift+J" that I said above!

I didn't even know it has a keyboard shortcut. I have never used it.

Share this post


Link to post
2 hours ago, programmerdelphi2k said:

I always use it, it's very usable to "rename / replace" any text on selection! ... (period, comma, braket not just text)

I just tried it in Delphi 10.2: I can only rename identifiers, it doesn't work for any other text or even special characters. But even with this limitation it is useful.

 

And I know now, why I haven't used it: It's available since Delphi 2010 and until a while ago I was using Delphi 2007 for most projects.

Share this post


Link to post

if Im not wrong, since D2005

(period, comma brakr5 NOT   , just text) typo fault

 

you can use TAB key to jump between text. you use Allows (moving)for dont delete text while typing new text.

attached a pdf with more info 

Delphi2005Refactoring.pdf

 

I love Ctrl+D and Ctrl+Shift+J all day

 

recorded in RAD 11.2 ALexandria = Ctrl+Shift+J and regular text replacement...

 

bds_8MCPY6TeOk.gif

Edited by programmerdelphi2k
  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×