Svyatogor's cave Just another WordPress weblog

15May/084

Gedit grep plugin

When I first saw Gedit it was to Gnome as Notepad to Windows. Time passed and Notepad is still the same :) Gedit though became much more powerful. I'd say it's approaching TextMate. And it has a very powerful plugin system. I had couple of ideas of useful plugins, but decided to start with a simple one.

Objective: A plugin allows to search in all opened files (even unsaved) or files in a given directory. In the later case it allows to specify if subdirectories should also be scaned and has a way to specify which files to search in.

There are two similar plugins available at Gedit page, but they don't meet the above requirements fully. So I spent an evening studying how to write plugins in python and here is the result!


Download plugin: gedit-grep-v0.1

To install the plugin just unzip the contents of the archive into ~/.gnome2/gedit/plugins/ and then enable the "Grep" plugin in Gedit preferences.

Filed under: English Leave a comment
Comments (4) Trackbacks (0)
  1. Doesn’t work for me on Ubuntu 8.04 and Gedit 2.22.3.

    When I hit OK, button nothing happens. Am I missing something? Where are the search results supposed to go?

  2. Do you have Bottom Pane enabled? If not please enable it from the View menu.

  3. I think it’s quite buggy. I search for “log-in” in all the directory — this string appears in several places but it’s only finding one file.
    Then I open a file that contains the string and I search again, this time in currently opened files. It’s finding it in that file.

    The other problem is that the search results tab in the bottom pane in Gedit only has 3 scrollable lines and I cannot extend its width. It is very incovenient when there are many search results to only be able to use 3 lines worth of view in the search results tab.

  4. I think it’s quite buggy. I search for “log-in” in all the directory — this string appears in several places but it’s only finding one file.
    Then I open a file that contains the string and I search again, this time in currently opened files. It’s finding it in that file.

    The other problem is that the search results tab in the bottom pane in Gedit only has 3 scrollable lines and I cannot extend its width. It is very incovenient when there are many search results to only be able to use 3 lines worth of view in the search results tab.


Leave a comment


Spam Protection by WP-SpamFree Plugin

 

No trackbacks yet.