29 May, 2006

Regex searches in gedit!

One thing that bothered me about gedit was the lack of support for regular expressions when searching text. But now that gedit have Python plugins I thought that it would be really easy to add such thing using Python's "re" module.

And indeed it was. Now I have this neat Python plugin called "Regex Search". You can download it from here.

Here is a screenshot of the plugin in action:


Just put the files in /usr/[local/]lib/gedit-2/plugins, as it's not a package yet. You can then access it from the "Tools" menu, in gedit.

I hope gedit guys will realize the imense usefulness of this plugin an decide to ship it along with the standard plugins. :-D

Update: Forgot to say that you need at least a gedit 2.14 to run this, since Python plugins are a relatively new addition.

9 Comments:

Blogger Rudá Moura said...

What a shame! I'm only runnning gedit 2.12. Your plugin is made for gedit 2.14.

I'm gonna wait for Ubuntu Dapper to come.

May 30, 2006 1:10 PM  
Blogger Groening said...

hi there, this plugin works fine, so -> good job!!! thx a lot

to make it really useful:

is it possible to change or extent its functionality with "search AND replace"??

this might (not only in my case) be the main intension to use RegExp on a file at all

September 17, 2006 4:51 PM  
Blogger bobby said...

This is a great extension, but I echo the sentiments of "groening": replace is a core requirement for developers using gedit. Obviously, that's quite a bigger task than the standard search, but I see no reason for the community not to be working on this.

Is there somewhere more permanent than a blog that development on this plugin can be tracked?

It would also be nice for regexp search to be line-based - i.e. ^ and $ should refer to the beginning/end of each line, not the entire document.

I'm considering doing some work on this - do you intend to accept patches and/or maintain this plugin for future development?

February 13, 2007 5:00 PM  
Blogger dakomoon said...

Man your a life saver thanks a million.

June 8, 2007 8:37 PM  
Blogger Rafael said...

Hey man! Here is your plugin with replace stuff

http://rafaelsilva.net/node/103

Thankyou!

October 25, 2007 1:35 PM  
Blogger Daniel d'Andrada T. de Carvalho said...

@rafael

That's nice Rafael. It's good to see the code being extended and improved.

It seens Ben Fisher also took it one step further.

March 31, 2008 8:14 AM  
Blogger Rafael said...

Hey, very good to know :-)

May 21, 2008 10:11 PM  
Blogger cesium5500 said...

COULD IT BE MORE STABLE... Was workin very well and then not able to replace anything anymore. At least it was still finding the stuff...

Like plugin that work each time you need it not only when the want

February 13, 2009 1:21 PM  
Blogger Daniel d'Andrada T. de Carvalho said...

@cesium5500, Groening, bobby

Hi there. I'm glad to know that it was useful to you somehow.

I made this plugin a long time ago, delivered it to gedit guys but it was not integrated into their main tree, thus it has not been maintained since.

It's also a basic regex thing and definitely lacking features. Some people extended it further, as you can see in previous comments, but it seems it still didn't make it into the main tree.

Anyway, I'm a bit surprised that it's still compatible with the current gedit API.

February 14, 2009 1:53 PM  

Post a Comment

<< Home