Delphi 2010 IDE Block text copy/paste

Hi
I have been searching which hot key let you cut and past a block of text (NOT A BLOCK OF LINE)
I have found out painfully how to highlight it (aka select it)
with <ctrl><Alt> <mouse down> but after ???
it is a very time saving feature actually fundamental but I was too blind to find it or it is not very well documented
and the help being what it is....
any ideas ?
Thank you
PW
0
Philippe
4/21/2010 1:29:17 PM
embarcadero.delphi.non-tech 5933 articles. 1 followers. Follow

9 Replies
871 Views

Similar Articles

[PageSpeed] 31

"Philippe Watel" wrote in message news:236134@forums.embarcadero.com...
> Hi
> I have been searching which hot key let you cut and past a block of text 
> (NOT A BLOCK OF LINE)
> I have found out painfully how to highlight it (aka select it)
> with <ctrl><Alt> <mouse down> but after ???

Mabe I'm missing the point here but how about Ctrl+c - Ctrl+v :)

Leo
0
Leif
4/21/2010 1:48:25 PM
Am 21.04.2010 15:48, schrieb Leif Eirik Olsen:
> "Philippe Watel" wrote in message news:236134@forums.embarcadero.com...
>> Hi
>> I have been searching which hot key let you cut and past a block of text 
>> (NOT A BLOCK OF LINE)
>> I have found out painfully how to highlight it (aka select it)
>> with <ctrl><Alt> <mouse down> but after ???
> 
> Mabe I'm missing the point here but how about Ctrl+c - Ctrl+v :)
> 
> Leo

Yep, and alt+mouse down is sufficient. Ctrl is not required.

Greetings

Markus
0
Markus
4/21/2010 7:02:48 PM
<Philippe Watel> wrote in message news:236134@forums.embarcadero.com...
> Hi
> I have been searching which hot key let you cut and past a block of text 
> (NOT A BLOCK OF LINE)
> I have found out painfully how to highlight it (aka select it)
> with <ctrl><Alt> <mouse down> but after ???
> it is a very time saving feature actually fundamental but I was too blind 
> to find it or it is not very well documented
> and the help being what it is....
> any ideas ?
> Thank you
> PW

Do you mean a true rectangular block of text? If so, you put the editor in 
"block" mode with <Ctrl>-O,C and then use the keyboard to extend the 
selection as required. The moment you use the mouse for selection the block 
mode is cancelled.

Once the selection is made, you use cut/copy/paste as normal.

The <Ctrl>-O,C is one of the old WordStar key combinations still supported - 
it may not be present in all the different key mappings.

Alistair.
0
Alistair
4/21/2010 9:40:31 PM
Alistair Ward wrote:

> Do you mean a true rectangular block of text? If so, you put the
> editor in "block" mode with <Ctrl>-O,C and then use the keyboard to
> extend the selection as required. The moment you use the mouse for
> selection the block mode is cancelled.

You can also use the mouse, but you must press Alt while selecting. I
use that a lot.
-- 
Rudy Velthuis (TeamB)        http://www.teamb.com

"By trying we can easily learn to endure adversity; another
 man's, I mean."
 -- Mark Twain
0
Rudy
4/21/2010 10:17:01 PM
Hi,

As others have pointed out, once you highlight your block of text, you can 
use the standard clipboard commands to copy the selected text block and 
paste it elsewhere in your code.

To change from column selection back to line selection (the default), press 
Ctrl+O+K.

Column selection has some neat capabilities, even when not selecting 
multiple lines.  For example, consider the following code:

Canvas.Font.Color := clBlue;
Canvas.Font.Style := [ fsBold ];
Canvas.Font.Name := 'Tahoma';
Canvas.Font.Size := 14;
Canvas.Brush.Color := clYellow;

Now suppose I want to prefix each statement with the name of a control (eg. 
Panel1).  Instead of typing it in for each statement (or using a with 
statement), I can type Panel1 on the first statement, so the code looks like 
this:

Panel1.Canvas.Font.Color := clBlue;
Canvas.Font.Style := [ fsBold ];
Canvas.Font.Name := 'Tahoma';
Canvas.Font.Size := 14;
Canvas.Brush.Color := clYellow;

Then, I put the cursor on the "P" in Panel1 and then go into Column 
Selection mode (hold Alt key down) to select "Panel1." (including the dot). 
Notice that the selection extends 1 character beyond the cursor position, 
which is different than normal text selection.  Next, copy the selected text 
to the clipboard (Ctrl+C or Ctrl+Ins).

Next move the cursor down to the beginning of the next line, to the left of 
the "C" in Canvas.  The press the Paste command (Ctrl+V or Shift+Ins).  The 
"Panel1." text is pasted at the beginning of the statement as you would 
expect.  BUT notice where the cursor is now!  The cursor is positioned on 
the next line (3rd line in our example) to the left of the "C" in Canvas. 
All you need to do is to press the Paste command again and again to insert 
the text into the successive lines.

This is very effective and one of my favorite tricks with column selection. 
Interestingly enough, this capability has been in Delphi since Delphi 1.

Ray

--
Ray Konopka
Raize Software




> I have been searching which hot key let you cut and past a block of text 
> (NOT A BLOCK OF LINE)
> I have found out painfully how to highlight it (aka select it)
> with <ctrl><Alt> <mouse down> but after ???
> it is a very time saving feature actually fundamental but I was too blind 
> to find it or it is not very well documented
> and the help being what it is....
> any ideas ?
> Thank you
> PW
0
Ray
4/23/2010 4:08:24 PM
Or simply:
Block mode: Alt+Shift+Cursor keys
Line mode (= normal mode): Shift+Cursor keys
0
Utf
4/23/2010 5:09:07 PM
However, once you go into Block selection mode, using Shift+Cursor keys 
still keeps you in block selection mode.  To exit block selection mode, you 
must press Ctrl+O+K.

Ray


> Or simply:
> Block mode: Alt+Shift+Cursor keys
> Line mode (= normal mode): Shift+Cursor keys
0
Ray
4/24/2010 10:22:51 PM
> However, once you go into Block selection mode, using Shift+Cursor keys
> still keeps you in block selection mode.  To exit block selection mode, you
> must press Ctrl+O+K.
True. I always thought it was happening randomly, but now I finally 
noted block mode gets canceled when you click. It has always been confusing.

IMO the current behavior is a bug. The more intuitive behavior would be: 
when the cursor is moved such that the selection goes away the block 
selection mode *should* end automatically. If there is a block selection 
already and you press shift+cursor keys to alter it, it should switch to 
line mode. If there is a block selection already and you press 
shift+*alt*+cursor keys to alter it, it should stay in block selection 
mode and extend/shrink the selection as appropriate.

Idea behind that:
Shift+Alt aren't toggle keys like caps-lock, when you release them the 
modifier status should go away (except if it alters an already existing 
selection, since you would always loose block selection and go back to 
line selection when releasing the shift+alt keys after you are done 
selecting, thus making block selections impossible).
0
Utf
4/25/2010 12:03:47 AM
"Ray Konopka" <rkonopka@raize.com> wrote in message 
news:236862@forums.embarcadero.com...
>
> Column selection has some neat capabilities, even when not selecting
> multiple lines.  For example, consider the following code:
>
> Canvas.Font.Color := clBlue;
> Canvas.Font.Style := [ fsBold ];
> Canvas.Font.Name := 'Tahoma';
> Canvas.Font.Size := 14;
> Canvas.Brush.Color := clYellow;
>
> Now suppose I want to prefix each statement with the name of a control 
> (eg.
> Panel1).


To put 'Panel1' infront of every line I would rather do this :
1. Select the lines to be changed (not block mode)
2. Press Shift-Ctrl-J  then Arrow Left
3. Type 'Panel1.'

Much quicker:)

Leo
0
Leif
4/26/2010 7:58:58 AM
Reply:

Similar Artilces:

Delphi XE / Delphi 2010
Hello! I noticed that Embarcadero® Delphi® 2010 Version is not on the list of products on Embarcadero page. Or is it still possible to buy it? Will RAD Studio XE compile programs written in Delphi 2010 without problems.? Thanks. Am 13.09.2010 09:04, schrieb Petra Nemec: > Will RAD Studio XE compile programs written in Delphi 2010 without problems.? As always you will probably have to recreate the projects as the import is still a bit -- special. Christian Hello! Does anybody know if it is still possible to get a Delphi2010 trial version (if yes where)? ...

from delphi 6 to delphi 2010
Hi. It is possible, with component RX, dxforumlibrary, InfoPower3000Pro, StringAlignGrid. Accepts communication BDE. Thank by comments. excequiel arostica wrote: >Hi. > It is possible, with component RX, dxforumlibrary, >InfoPower3000Pro, StringAlignGrid. Accepts communication BDE. > >Thank by comments. Rx is dead and sources are taken over by jcl/jvcl. I dont know about the rest of the components and i have no experiences with bde over the last 9 years. excequiel arostica wrote: > Hi. > It is possible, with component RX, dxforumlibrary,...

Price of upgrade from Delphi 2010 Professional to Delphi 2010 Enterprise?
It's weird, but I could not find the answer on so simple question not in Embarcadero Shop, neither by the forum search. For example, the shop info about Enterprise upgrade says: The Upgrade product is available to registered owners of 2006-2009 versions, blah-blah... So, if I'm Delphi 2010 Professional user, I even not eligible for upgrade? I have to buy a new version of Enterprise??? But if I'm Delphi 2006 Professional user, I can upgrade. Please clarify this nonsense for me. Exact question is in the subject. Thanks! Hi Dmitri, > It's weird, but I could not...

Delphi 2010 Ribbon Demo
Subject: Delphi 2010 Ribbon Demo - how are the Clipboard commands (Paste, Cut, Copy, Delete) linked to the RichEdit? In the Delphi 2010 Ribbon Demo project, I cannot find the way in which the Cut, Copy and Paste commands are linked to the RichEdit. I checked all the properties of the ActionManager as well as the code in the RibbonDemoMainForm.pas unit, but cannot see where it is linked. How does the Cut, Copy and Paste command buttons on the ribbon automatically activate and deactivate when the cursor is in the RichEdit? What are the steps required to establish the link? ...

Using Delphi 7 and Delphi 2010
I had a project in Delphi 7. I worked on it in Delphi 2010. When I try to open the .dpr again in Delphi 7, the IDE toolbar widens across both monitors, and Delphi 7 locks up. It appears that Delphi 2010 modifies the .dpr in a way that makes Delphi 7 unable to open it again. All my forms & units appear to open fine in D7 after D2010, except for the warnings on the ExplicitHeight and ExplicitWidth properties being missing... I can easily recreate the .dpr, but is this expected behavior? Thanks. Tom Field wrote: > I had a project in Delphi 7. > > I worked o...

Migrate from Delphi 2007 to Delphi 2010
Hi All, Thanks in advance for your help. Below is my query, Currently I am using Delphi 2007 and i want to migrate to Delphi 2010. 1. What all things i need to take care while doing this? 2. What all third party components will get impacted? 3. Any known issues in Delphi 2010 which might impact the cause? 4. Any changes in database operation required as i am using Oracle? Hope I have post this query under correct category. If not sorry for the trouble and could you please suggest me the correct category for this? Looking forward for your response. Have a great day. Th...

Delphi 2010 w Delphi 2007
I have D2007 installed on my laptop (XP sp3 running on dual core Athlon). Can I install D2010 on this machine without it affecting D2007? Will D2010 affect D2007 in any way? Thanks, Randall Carpenter > {quote:title=Randall Carpenter wrote:}{quote} > I have D2007 installed on my laptop (XP sp3 running on dual core Athlon). > Can I install D2010 on this machine without it affecting D2007? Will D2010 > affect D2007 in any way? Won't hurt a thing. I have D7, RAD Studio 2007, RAD Studio 2009, and RAD Studio 2010 all on my desktop system and they coexist fine. Jus...

Migrating From Delphi 7 to Delphi 2010
We did not know which forum was the best for this question. We have been wanting to migrate from Delphi 7 to a later version for years but it appears to be a daunting task. We first looked at D2006 and that was a radical new world. We bought D2010 a couple of years ago and not done much with it because there are so many parts to our applications. We have done a few new applications in D2010 and they seem to work okay. D2010 has not been impressive, perhaps because of the strangeness compared to D7. Is is possible for us to do a phased sort of migration where we do a form at a time? ...

delphi 2006 code in delphi 2010
hello, is there any option to make delphi 2006 code work in delphi 2010? something like in java IDEs where you can define the code level you like to use? the problem is, that i made a project with 2006 and sent it to my customer. they got 2010 and it compiles fine, but it just doesn't work. it deals with en-/decryption of text, we assumed, that it has something to do with ansi vs. unicode strings... but we cant find the exact position where the error occurs. i am a bit dissapointed, because everywhere i read that the new IDE will always be downwards compatible and so on.. but in ...

Delphi 2010 professional to Delphi XE3
Hello, Sorry for this is not right place to ask this question: I have Delphi 2010 professional version, I like to upgrade to Delphi XE3 Am eligible to upgrade or no not? I like answer from Delphi sales team. I couldn’t find email to ask them. Thanks Mike Thomas <> wrote in news:506459@forums.embarcadero.com: > Hello, > > Sorry for this is not right place to ask this question: > I have Delphi 2010 professional version, I like to upgrade to Delphi > XE3 Am eligible to upgrade or no not? I like answer from Delphi > sales team. I couldn’t find emai...

Free RAD Studio 2010 and Delphi Prism 2011 with purchase of Delphi 2010
Hi All, For those of you who complain that Delphi (and RAD Studio) is too expensive... for a few short weeks there are two overlapping special offers from Embarcadero that you can use to move up to RAD Studio 2010 including the latest Delphi Prism 2011 for the price of a single Delphi 2010 (New User or Upgrade)... The first "RAD Studio PROMO" offer is still valid until June 28th: when you order Delphi 2010, you get RAD Studio 2010 delivered instead (including Delphi 2010, C++Builder 2010 and Delphi Prism 2010). As of May 26th, the "Delphi Prism 2011" of...

Comparison between Visual Studio 2008 IDE and Delphi 2010 IDE?
Hi, I wonder which is more programmer friendly. Especially for syntax highlighting and fast code writting, viewing.. Thanks.. Mehmet Fide wrote: > Hi, > > I wonder which is more programmer friendly. Especially for syntax > highlighting and fast code writting, viewing.. > > > Thanks.. See "RAD Studio 2010 vs. Visual Studio 2010" in non-technical group. -- Warm Regards, Lee ...

Delphi 6 and Delphi 2010 Install same machine
I'm currently still on Delphi 6 for some legacy software, but I'm looking at installing Delphi 2010 on my Windows XP machine. Are there any known issues with installing D2010 on an XP machine that already has Delphi 6 installed? (I'm not talking about updating the projects code/controls/etc, just running the IDE's). > I'm currently still on Delphi 6 for some legacy software, but I'm > looking at installing Delphi 2010 on my Windows XP machine. > > Are there any known issues with installing D2010 on an XP machine that > already has Delphi 6 i...

Delphi 7 to Delphi 2010
We have decided to move up some applications running under Delphi 7 to Delphi 2010. However, I was surprise to see that simply recompiling the application causes the application to be much slower than version 7. We have a lot of string transformation routines, some mathematical transformations, etc. When I mean slower, I mean up to two times slower than with Delphi 7, so it not a minor difference. (The EXE is also a lot bigger but I don't worry too much about that). Is there something I can do to obtain the same kind of speed I had in Delphi 7 but with Delphi 2010? ...

Web resources about - Delphi 2010 IDE Block text copy/paste - embarcadero.delphi.non-tech

Resources last updated: 11/23/2015 9:38:50 PM