[Lazarus] I say a little prayer (for the Lazarus editor)

Martin Frb lazarus at mfriebe.de
Sat Feb 20 15:12:00 CET 2021

On 20/02/2021 15:03, Martin Frb via lazarus wrote:
>> But if the text is column-selected, Delphi sets the cursor at point 
>> (x,y+1),
>> in the row below.
> I thought I had seen that once (I used to once have D5) but I could 
> neither remember where, nor how it was triggered....

Here is the Pascal script you need:

var x: Integer;
x := Caller.CaretX;
Caller.CaretX := x;

Open the editor MAcro window : ctrl-shift L

- Record a new macro. You need to record something, e.g. move caret up, 
while recording. End recording.
- Select the recorded macro in the list => EDIT
- Copy above script into the macro, replacing its content.
- Save (ctrl S)

Then rename the macro.
Assign a key to it.

Below the list of macros (in the macro window) is a "move to:" Project IDE

*** Move it to "IDE" ***

You can get to it again using the tabs above the list.

"Recorded" macros,  are deleted when you close the IDE
"Project" macros are kept but only avail for the one project.

"IDE" are global and kept.

Now you have a key to paste (column or normal selection) into the editor 
and keep the X.

If you want you can add an
before the "end."

Then it will also go one line down.

More information about the lazarus mailing list