Discussion:
[Lazarus] Improvement: Lazarus editor (synedit)
Fabio Luis Girardi
2016-07-07 12:36:11 UTC
Permalink
Hi!

Currently Lazarus Editor (synedit), with a text selected, If I press

(

It erases my selection and replace it by (

Is much harder to change this to, when press ( do (my selection), instead
of erase and replace my selection by ( ?

If it's easy to do, somebody can point me where I have to change to get
this feature?

This is a very useful feature when writing conditions on if and while
statements.
--
The best regards,

Fabio Luis Girardi
PascalSCADA Project
http://sourceforge.net/projects/pascalscada
http://www.pascalscada.com
Graeme Geldenhuys
2016-07-07 12:48:57 UTC
Permalink
Post by Fabio Luis Girardi
This is a very useful feature when writing conditions on if and while
statements.
Does Lazarus IDE support Macros? If so, that could be an even easier
solution producing the same end result. Make a selection, trigger the
macro with a custom keyboard shortcut, and the macro does the rest by
using the selection.

Regards,
Graeme

--
Lukasz Sokol
2016-07-07 13:31:03 UTC
Permalink
Post by Fabio Luis Girardi
Hi!
Currently Lazarus Editor (synedit), with a text selected, If I press
(
It erases my selection and replace it by (
Is much harder to change this to, when press ( do (my selection), instead of erase and replace my selection by ( ?
If it's easy to do, somebody can point me where I have to change to get this feature?
This is a very useful feature when writing conditions on if and while statements.
In 1.4.4 I have

select text -> right click -> Source -> Enclose selection...* but it does not have ( ) as options,

maybe newer ones have ?

* and it has keyboard shortcuts to reach it too

-L.
Post by Fabio Luis Girardi
--
The best regards,
Fabio Luis Girardi
PascalSCADA Project
http://sourceforge.net/projects/pascalscada
http://www.pascalscada.com
--
Graeme Geldenhuys
2016-07-07 13:44:44 UTC
Permalink
Post by Lukasz Sokol
select text -> right click -> Source -> Enclose selection...* but it does not have ( ) as options,
Wow, and so I learned another new feature of Lazarus IDE. :) Some of
those options I’ll be using often from now onwards.

Regards,
Graeme

--
Fabio Luis Girardi
2016-07-07 14:15:28 UTC
Permalink
Post by Lukasz Sokol
In 1.4.4 I have
select text -> right click -> Source -> Enclose selection...* but it does
not have ( ) as options,
maybe newer ones have ?
No, Lazarus trunk don't have ( ) as option.
--
The best regards,

Fabio Luis Girardi
PascalSCADA Project
http://sourceforge.net/projects/pascalscada
http://www.pascalscada.com
Fabio Luis Girardi
2016-07-07 17:16:01 UTC
Permalink
Post by Fabio Luis Girardi
Is much harder to change this to, when press ( do (my selection), instead
of erase and replace my selection by ( ?
http://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Macros
http://wiki.lazarus.freepascal.org/Editor_Macros_PascalScript
Assign the below macro to the ( key/keycombo
begin
if caller.SelAvail then begin
caller.SelText := '('+caller.SelText+')';
end
else
ecChar('(');
end.
Should I to install some package on Lazarus to get this?
--
The best regards,

Fabio Luis Girardi
PascalSCADA Project
http://sourceforge.net/projects/pascalscada
http://www.pascalscada.com
Graeme Geldenhuys
2016-07-07 17:43:14 UTC
Permalink
Assign the below macro to the ( key/keycombo
How do you assign keyboard shortcuts to macros. The “Edit Key” button is
always greyed out.


Regards,
Graeme

--

Loading...