Lazarus

Announcements => Third party => Topic started by: theo on December 09, 2022, 01:19:29 pm

Title: Search panel plugin for the Lazarus IDE
Post by: theo 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
Title: Re: Search panel plugin for the Lazarus IDE
Post by: howardpc 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.
Title: Re: Search panel plugin for the Lazarus IDE
Post by: zeljko on December 09, 2022, 02:27:35 pm
Great plugin ! :)
Title: Re: Search panel plugin for the Lazarus IDE
Post by: theo 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
Title: Re: Search panel plugin for the Lazarus IDE
Post by: lainz 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?
Title: Re: Search panel plugin for the Lazarus IDE
Post by: theo 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.

Title: Re: Search panel plugin for the Lazarus IDE
Post by: Curt Carpenter 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
 
Title: Re: Search panel plugin for the Lazarus IDE
Post by: theo 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.
Title: Re: Search panel plugin for the Lazarus IDE
Post by: wp 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.
Title: Re: Search panel plugin for the Lazarus IDE
Post by: theo 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.
Title: Re: Search panel plugin for the Lazarus IDE
Post by: Curt Carpenter on December 10, 2022, 03:12:00 am
Thank you theo.  I upgraded to Lazarus 2.2.4  and the search bar installed seamlessly.
Title: Re: Search panel plugin for the Lazarus IDE
Post by: Curt Carpenter 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.
Title: Re: Search panel plugin for the Lazarus IDE
Post by: avra 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.
Title: Re: Search panel plugin for the Lazarus IDE
Post by: KodeZwerg on January 27, 2023, 03:23:00 pm
You could add this to OPM.
Isnt it already or am I confused by name?
Title: Re: Search panel plugin for the Lazarus IDE
Post by: avra on January 27, 2023, 03:57:37 pm
You could add this to OPM.
Isnt it already or am I confused by name?
:D :D :D
Title: Re: Search panel plugin for the Lazarus IDE
Post by: Onur2x on January 29, 2023, 07:59:42 pm
Very nice. Turkish language file pls add your project.
Title: Re: Search panel plugin for the Lazarus IDE
Post by: lainz on February 14, 2023, 03:29:55 pm
If I select text in the code editor then I search, the search is limited to the selected text, please fix that...
Title: Re: Search panel plugin for the Lazarus IDE
Post by: wp on February 14, 2023, 04:52:30 pm
If I select text in the code editor then I search, the search is limited to the selected text, please fix that...
This sentence is misleading. Because the search currently is NOT limited to the selected text, but I could imagine that you want to search ONLY the selected text.
Title: Re: Search panel plugin for the Lazarus IDE
Post by: lainz on February 14, 2023, 05:20:58 pm
No wp, I wanted to say I was searching for a define "API_LOCALHOST" and it showed me than only one instance was available "1/1", but I have it in 2 places, in the define and in an ifdef in code.

Strange but that happened when the selected thext was API_LOCALHOST. For that I thoug that that was the case.. but maybe was just coincidence or a strange case...
TinyPortal © 2005-2018