Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating custom search button in Notepad++

I am looking for a way to create custom buttons for Notepad++. So far I haven't been able to find solutions regarding this.

The buttons would be doing a regular expression search and highlight the search results as well. This would make it much easier for me to analyze error logs. This would eliminate the need of copy/pasting the long regex search queries.

I'm trying to use the Customize Toolbar plugin to accomplish this, but I couldn't find a thorough documentation of it and therefore having troubles.

Any help would be appreciated.

like image 316
Endy Avatar asked Dec 17 '13 09:12

Endy


Video Answer


1 Answers

There you go:

  1. Download "Customize Toolbar" from the "Plugin Manager"

  2. Go to menu "Plugins" > "Customize Toolbar" and select "Custom Buttons"

  3. Restart Notepad++

  4. Now it's the important part, where you need to create the button's functionality. In your case you want to simply search and fortunately this can be implemented in a Macro. If you need something more complex that can't be recorded in a Macro, consider the use of "Python Script" plugin (which is really easy even with a minimal knowledge of Python) or writing your own plugin (which I guess is more difficult, I never tried to). So, let us assume that you recorded a Macro and you named it "test".

  5. Find and open the file %APPDATA%\Notepad++\plugins\config\CustomizeToolbar.btn

  6. Add the following new row in the file:

    Macro,test,,,

That's all. You now have a new button in your toolbar that runs your macro.

like image 99
psxls Avatar answered Oct 27 '22 23:10

psxls