[Lazarus] Where can I switch OFF automatic copy in code editor?

Martin Frb lazarus at mfriebe.de
Tue Jul 21 15:13:22 CEST 2020


On 21/07/2020 11:37, Bo Berglund via lazarus wrote:

> Seems like middle click will paste whatever is currently selected at
> the location where the mouse pointer is moved.

Yes middle click, will get current selection. And afaik it can do this 
cross applications.

>
> Based on the above experiments it seems like I can make copies of a
> piece of text by just selecting it and then pointing the mouse at the
> destination and hit the middle button. It will then be copied there.
>
> Since I did not know that I had been holding the Ctrl key on the
> keyboard while dragging the selection to the destination. This action
> seems to affect the clipboard so what was in it is replaced by the
> dragged text.
That still should not replace the ctrl-c/v clipboard.... Strange.

If you drag without ctrl, will the ctrl-c/v clipboard also be affected, 
or does it keep its content?

Also, just curiosity, but you said you drag the "{$Endif} to a diff 
location? Holding Ctrl means you drag it, but keep the orginal => so you 
end up with 2 $ENDIF ?

> But the tests you suggested revealed previously hidden (for me)
> functionality I can use going forward!
>

Btw, on top of the other suggestion doing the $Endif stuff. You can 
assign a single keycombo to type {$Endif}.
(Editor macros are in the view menu)

- record an editor macro  (IIRC  ctrl-shift r)
- type: {$Endif}
- stop recording (IIRC  ctrl-shift r)

In the editor macro dialog, move the macro to IDE (so its global), and 
assign a key-combo.

Then you just paste the {IFDEF....}
and insert the $Endif via your key combo.




More information about the lazarus mailing list