Recent

Author Topic: Search panel plugin for the Lazarus IDE  (Read 2663 times)

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Search panel plugin for the Lazarus IDE
« on: December 09, 2022, 01:19:29 pm »
Hi

I've written a search panel plugin for the Lazarus IDE that might be of interest to people who prefer an accessible search interface without forms, message boxes and function keys, the way it is almost a standard in many applications these days.
It searches as you type, so you can easily correct the search and it shows you how many hits there are.

Read more and download here:
https://github.com/theo222/laz_idesearchpanel

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Search panel plugin for the Lazarus IDE
« Reply #1 on: December 09, 2022, 02:01:41 pm »
A really great contribution, thanks Theo.
The readme.md is sufficient documenation, and once the package is installed in the IDE a narrow search panel is inserted between the bottom of the source editor and the editor status bar.
Installed and worked flawlessly for me on Win 11.
Possible enhancement: typed string is coloured (say) red if no matches are found.

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Search panel plugin for the Lazarus IDE
« Reply #2 on: December 09, 2022, 02:27:35 pm »
Great plugin ! :)

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: Search panel plugin for the Lazarus IDE
« Reply #3 on: December 09, 2022, 02:32:26 pm »
Thank you howardpc and  zeljko!   :)

Possible enhancement: typed string is coloured (say) red if no matches are found.
Good idea!
Update: https://github.com/theo222/laz_idesearchpanel

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Search panel plugin for the Lazarus IDE
« Reply #4 on: December 09, 2022, 05:20:59 pm »
Hi, is working well, like in VS Code and Android Studio  :)

Why not Ctrl + F to search with this, to replace the old window, and the old window with Ctrl + P?

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: Search panel plugin for the Lazarus IDE
« Reply #5 on: December 09, 2022, 06:03:46 pm »
Hi, is working well, like in VS Code and Android Studio  :)

Why not Ctrl + F to search with this, to replace the old window, and the old window with Ctrl + P?

Hello Lainz

Thank you for your test and your feedback.

I don't think the Search Panel should automatically "steal" Ctrl+F, it would be confusing.
However, you can easily change the key mappings for your installation yourself.

« Last Edit: December 09, 2022, 06:13:33 pm by theo »

Curt Carpenter

  • Sr. Member
  • ****
  • Posts: 396
Re: Search panel plugin for the Lazarus IDE
« Reply #6 on: December 09, 2022, 07:06:33 pm »
This looks great, but I'm having trouble getting it installed.  I'm using Linux, Lazarus 2.0.8 with anchordocking and FPC 3.0.4.  Any guidance would be appreciated.

If I add FCL to the Required Packages, the .lpk compiles when I try to install I get the message "The package idesearchpanelp does not have any "Register" procedure which typically means it does not provide any IDE addon. Installing it will probably only increase the size of the IDE and may even make it unstable."

Any guidance would be appreciated -- this really looks like a useful tool.

Thanks
 

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: Search panel plugin for the Lazarus IDE
« Reply #7 on: December 09, 2022, 07:42:21 pm »
Hello Curt
This looks great, but I'm having trouble getting it installed.  I'm using Linux, Lazarus 2.0.8 with anchordocking and FPC 3.0.4.  Any guidance would be appreciated.
It would recommend you to update your Lazarus version.
Your version is from April 2020.

https://sourceforge.net/projects/lazarus/files/
Or using fpcupdeluxe:
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/v2.2.0n

Then simply follow these steps:
https://wiki.lazarus.freepascal.org/Install_Packages#Adding_new_packages
There is nothing special about it.

wp

  • Hero Member
  • *****
  • Posts: 11854
Re: Search panel plugin for the Lazarus IDE
« Reply #8 on: December 09, 2022, 08:05:58 pm »
Hello Curt
This looks great, but I'm having trouble getting it installed.  I'm using Linux, Lazarus 2.0.8 with anchordocking and FPC 3.0.4.  Any guidance would be appreciated.
It would recommend you to update your Lazarus version.
Your version is from April 2020.
Just tried to install the package in to v2.0.8 on Windows, and it did install und runs fine. There is one issue, though: After v2.0.x, the file format for package files was changed, and the package is stored in the new format. theo, could you please check the box "Maximize compatibility of package file (LPK)" in the package options. This way users of older Lazarus versions will be able to install the package, too. Earlier versions than 2.0 cannot compile the package due to the usage of ImageLists in BitBtn/SpeedBtn.

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: Search panel plugin for the Lazarus IDE
« Reply #9 on: December 09, 2022, 08:38:05 pm »
theo, could you please check the box "Maximize compatibility of package file (LPK)" in the package options. This way users of older Lazarus versions will be able to install the package, too.
OK, done.

Curt Carpenter

  • Sr. Member
  • ****
  • Posts: 396
Re: Search panel plugin for the Lazarus IDE
« Reply #10 on: December 10, 2022, 03:12:00 am »
Thank you theo.  I upgraded to Lazarus 2.2.4  and the search bar installed seamlessly.

Curt Carpenter

  • Sr. Member
  • ****
  • Posts: 396
Re: Search panel plugin for the Lazarus IDE
« Reply #11 on: January 27, 2023, 03:51:49 am »
I've been using Theo's search plugin for the Lazarus IDE for a few weeks now, and would like to urge that it be added to future releases of the IDE.  It's a great tool. 

And a suggestion:  since there is room on the search bar, how about adding buttons for code tools ctrl shift up, ctrl shift down and ctrl shift i functions?  These are also search functions (go to procedure definition, etc..) and it would be handy to have them there with the general search function.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Search panel plugin for the Lazarus IDE
« Reply #12 on: January 27, 2023, 01:23:44 pm »
Very nice!

You could add this to OPM. Consider implementing a Find All button which would show a popup form with a list of all lines where search term is found, and clicking on any goes directly to that line.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Search panel plugin for the Lazarus IDE
« Reply #13 on: January 27, 2023, 03:23:00 pm »
You could add this to OPM.
Isnt it already or am I confused by name?
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Search panel plugin for the Lazarus IDE
« Reply #14 on: January 27, 2023, 03:57:37 pm »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

 

TinyPortal © 2005-2018