Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-06

Source Editor enhancement mini-patch

21 messages · 9 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Giuliano Colla

Hi Lazarus team,

Lazarus IDE is IMO so superior to Delphi's that any comparison would be unfair.
However there's a Delphi IDE small feature which I miss when using Lazarus: a quick mouse access to the Jump Back/Jump Forward function, to navigate history. I find keyboard shortcuts (CTRL-H and Shift-CTRL-H) more cumbersome.

There's no easy way to add Icons to the NoteBook pages or tabs of the Source Editor window, so it came to my mind to add a source editor dedicated tool bar, to host those functions. It steals just 18 pixels in height, and one could take advantage of it to insert more editor related commands, which are now available in drop down menu's.

I attach a small patch to SourceEditor, just to show the idea. If accepted, it can be fully implemented, making it perhaps the umptieth option to the user configuration, extended, made fully configurable, etc.

If not, I'll just keep it for my personalized IDE.

(Double clicking on the added tool bar, it can be moved from top to right or to bottom. Quick and dirty just for testing the best position.)

Best,

Giuliano

-------------- next part --------------
A non-text attachment was scrubbed...
Name: idepatch.diff
Type: text/x-patch
Size: 8504 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140624/9b43de6e/attachment.bin>

Reply by email

Michael Van Canneyt
to Giuliano Colla
Giuliano Colla wrote 22 lines
Hi Lazarus team, Lazarus IDE is IMO so superior to Delphi's that any comparison would be unfair. However there's a Delphi IDE small feature which I miss when using Lazarus: a quick mouse access to the Jump Back/Jump Forward function, to navigate history. I find keyboard shortcuts (CTRL-H and Shift-CTRL-H) more cumbersome. There's no easy way to add Icons to the NoteBook pages or tabs of the Source Editor window, so it came to my mind to add a source editor dedicated tool bar, to host those functions. It steals just 18 pixels in height, and one could take advantage of it to insert more editor related commands, which are now available in drop down menu's. I attach a small patch to SourceEditor, just to show the idea. If accepted, it can be fully implemented, making it perhaps the umptieth option to the user configuration, extended, made fully configurable, etc. If not, I'll just keep it for my personalized IDE. (Double clicking on the added tool bar, it can be moved from top to right or to bottom. Quick and dirty just for testing the best position.)

There is already such a component, implemented by Graeme Geldenhuys, see components/editortoolbar.

Maybe you can improve that?

Michael.

Reply by email

Giuliano Colla
to Michael Van Canneyt

Il 24/06/2014 09:58, Michael Van Canneyt ha scritto:

[...]

Show quoted text 5 lines
There is already such a component, implemented by Graeme Geldenhuys, see components/editortoolbar. Maybe you can improve that?

There are so many things in Lazarus that a special edition of the Encyclopaedia Britannica would be barely sufficient to cover all of them :-)
I'll give a look. No point in reinventing the wheel. Chances are good that it's implementation is similar to what I had in mind, because I've seen in the past that Graeme and I share similar points of view on IDE usage.

Thank you.

Giuliano

Reply by email

Giuliano Colla
to leledumbo

Il 24/06/2014 11:15, leledumbo ha scritto:

It's a more general component than specifically jump back/forward. You can assign any IDE menu functionality to the toolbar button. Personally, I prefer the shortcut since it's faster.

Actually it does exactly what I had in mind (start from jump bak/forward, then add other functions from IDE menu). I was trying to reinvent the wheel.
I too usually prefer the faster keyboard shortcuts, but for some reasons for jumps I'm more at ease with the icon click.

Giuliano

Reply by email

FreeMan
to Giuliano Colla

24-06-2014 13:13 tarihinde, Giuliano Colla yazd?:

I too usually prefer the faster keyboard shortcuts, but for some reasons for jumps I'm more at ease with the icon click.

I was used to icon on editor toolbar too. keyboard shortcuts is better then nothing. I hope no body say (do) "this is been old removed it.!!!

Reply by email

Giuliano Colla
to FreeMan

Il 24/06/2014 12:26, FreeMan ha scritto:
[...]

I was used to icon on editor toolbar too.

Then you can install the package editortoolbar.lpk. You'll find it in lazarus/components/editortoolbar.
Once installed you may use "configure toolbar" to put in your toolbar whatever you like from IDE menu, and other dropdown menus.

Giuliano

Reply by email

Juha Manninen
to Giuliano Colla
Giuliano Colla wrote
Then you can install the package editortoolbar.lpk. You'll find it in lazarus/components/editortoolbar.

... and also in the Install/Uninstall packages dialog under "Available for installation". Easier.

Juha

Reply by email

Martin Frb
to Giuliano Colla: Lazarus IDE is IMO so superior to Delphi's that any comparison would be unfair. However…
Giuliano Colla wrote 8 lines
Hi Lazarus team, Lazarus IDE is IMO so superior to Delphi's that any comparison would be unfair. However there's a Delphi IDE small feature which I miss when using Lazarus: a quick mouse access to the Jump Back/Jump Forward function, to navigate history. I find keyboard shortcuts (CTRL-H and Shift-CTRL-H) more cumbersome.

I see Editortoolbar is already covered.

Since this is about navigating by mouse: By default the IDE reacts to the 2 extra buttons of a 5 button mouse (forward/backward in history). Similar like some web browser do.

If you do not have a 5 button mouse you can map this to other buttons. (also with shift/ctrl/alt / on some OS not all modifiers work with the right mouse button.)

Reply by email

Giuliano Colla
to Martin Frb

Il 24/06/2014 15:47, Martin Frb ha scritto:
[...]

Show quoted text 9 lines
Since this is about navigating by mouse: By default the IDE reacts to the 2 extra buttons of a 5 button mouse (forward/backward in history). Similar like some web browser do. If you do not have a 5 button mouse you can map this to other buttons. (also with shift/ctrl/alt / on some OS not all modifiers work with the right mouse button.)

Thank you for the hint.

Giuliano

Reply by email

Hans-Peter Diettrich
to Giuliano Colla: Lazarus IDE is IMO so superior to Delphi's that any comparison would be unfair. However…
However there's a Delphi IDE small feature which I miss when using Lazarus: a quick mouse access to the Jump Back/Jump Forward function, to navigate history. I find keyboard shortcuts (CTRL-H and Shift-CTRL-H) more cumbersome.

Just a note: Delphi shorcuts for these are Alt-Left and Alt-Right.

I also would like to have clickable forward/back items. They also might become part of the editor gutter?

DoDi

Reply by email

Martin Frb
to Hans-Peter Diettrich
Hans-Peter Diettrich wrote
Just a note: Delphi shorcuts for these are Alt-Left and Alt-Right.

Keys can be re assigned. I too use the alt variant

I also would like to have clickable forward/back items. They also might become part of the editor gutter?

I'd rather see a custom drawn pagecontrol, that allows for such buttons...

Reply by email

Michael Van Canneyt
to Martin Frb
Martin Frb wrote 9 lines
On 26/06/2014 11:12, Hans-Peter Diettrich wrote: > > Just a note: Delphi shorcuts for these are Alt-Left and Alt-Right. Keys can be re assigned. I too use the alt variant > > I also would like to have clickable forward/back items. They also might > become part of the editor gutter? I'd rather see a custom drawn pagecontrol, that allows for such buttons...

IMHO the easiest and most powerful solution is to incorporate the editortoolbar by default in the source editor.
Given the way screens have evolved, I'd place it at the right or left of the source editor.

Michael.

Reply by email

Martin Frb
to Michael Van Canneyt
Michael Van Canneyt wrote 13 lines
On Thu, 26 Jun 2014, Martin Frb wrote: > On 26/06/2014 11:12, Hans-Peter Diettrich wrote: >> >> I also would like to have clickable forward/back items. They also >> might become part of the editor gutter? > > I'd rather see a custom drawn pagecontrol, that allows for such > buttons... IMHO the easiest and most powerful solution is to incorporate the editortoolbar by default in the source editor. Given the way screens have evolved, I'd place it at the right or left of the source editor.

I have 2 screens, and I would not want it anywhere.... In fact, I use the option "Hide tabs, if only one unit in window"

Reply by email

Michael Van Canneyt
to Martin Frb
Martin Frb wrote 16 lines
On 26/06/2014 13:18, Michael Van Canneyt wrote: > On Thu, 26 Jun 2014, Martin Frb wrote: >> On 26/06/2014 11:12, Hans-Peter Diettrich wrote: >>> >>> I also would like to have clickable forward/back items. They also might >>> become part of the editor gutter? >> >> I'd rather see a custom drawn pagecontrol, that allows for such buttons... > > IMHO the easiest and most powerful solution is to incorporate the > editortoolbar by default in the source editor. > Given the way screens have evolved, I'd place it at the right or left of > the source editor. I have 2 screens, and I would not want it anywhere.... In fact, I use the option "Hide tabs, if only one unit in window"

'By default' also means "it can be disabled" for example by deinstalling it :)

It would be just one more option in the bazillion other options already at one's disposal. By including it by default, it also gets more exposure and can be substantially improved.

A custom-drawn tab (while no doubt useful on other accounts) is more limited in its possibilities, and is therefor (imho) the less preferable option...

Anyway, it was just a suggestion.

Michael.

Reply by email

Mattias Gaertner
to Hans-Peter Diettrich: Just a note: Delphi shorcuts for these are Alt-Left and Alt-Right. I also would like to…
Show quoted text 8 lines
Giuliano Colla schrieb: > However there's a Delphi IDE small feature which I miss when using > Lazarus: a quick mouse access to the Jump Back/Jump Forward function, to > navigate history. I find keyboard shortcuts (CTRL-H and Shift-CTRL-H) > more cumbersome. Just a note: Delphi shorcuts for these are Alt-Left and Alt-Right.

I added them as default keys.

Mattias

Reply by email

Martin Frb
to Michael Van Canneyt: 'By default' also means "it can be disabled" for example by deinstalling it :) It would…
Michael Van Canneyt wrote 9 lines
'By default' also means "it can be disabled" for example by deinstalling it :) It would be just one more option in the bazillion other options already at one's disposal. By including it by default, it also gets more exposure and can be substantially improved.

True, well I am not objecting it, if any one wants to do that.

A custom-drawn tab (while no doubt useful on other accounts) is more limited in its possibilities, and is therefor (imho) the less preferable option...

It is a different solution. "limited" can be an advantage in that case

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt: IMHO the easiest and most powerful solution is to incorporate the editortoolbar by default
Michael Van Canneyt wrote
Given the way screens have evolved, I'd place it at the right or left of the source editor.

That should be hard, but I purposely positioned it at the top, because I align the editor tabs to the right of the source editor (I can fit more tabs in without scrolling, and can read the file names easier). I don't like editors with tabs at the top or bottom. :)

Maybe the editortoolbar could be extended to add an alignment property inside its settings dialog.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Graeme Geldenhuys
to Giuliano Colla: Il 24/06/2014 09:58, Michael Van Canneyt ha scritto: [...] There are so many things in…
Giuliano Colla wrote
I'll give a look. No point in reinventing the wheel.

Install the editortoolbar add-on, then click the "configure" button. You can then add almost any menu item of the Lazarus IDE as a toolbar button. The Back/Forward history works very well - I have it configured on my editor toolbar, but must admit I normally use the keyboard shortcuts for those. I do find the "Jump To" functionality extremely useful though.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Giuliano Colla
to Graeme Geldenhuys

Il 29/06/2014 00:48, Graeme Geldenhuys ha scritto:

On 2014-06-24 09:13, Giuliano Colla wrote: > I'll give a look. No point in reinventing the wheel. Install the editortoolbar add-on, then click the "configure" button.

[...]
Already done. Installed, configured by adding what I wanted, and put to service.
(As I'm lazy, I just configured it on one of my platforms, and then I copied the XML configuration file to the others!)
It's more or less what I had in mind to do, and finding it already done, was a happy surprise.
Thank you very much!

Giuliano

Reply by email