Ruby-Jump plugin for gedit

Posted in Programming,Ruby,Utilities by ary on the February 10th, 2010

I searched the internet for a gedit plugin that would allow me to press a key and jump (navigate) to the file where a ruby class is defined. I couldn’t find one so I wrote one (I know about Geany but I couldn’t find that functionality there either).

Usage

If the file you are editing is located in a ruby on rails projects, this will work automatically. If not, you will need to have the FileBrowser plugin installed and activated. The file browser should be pointing to your project’s root path.

Pressing F3 will jump to the file of the name under the cursor. This uses ruby convention so if your cursor is over the word SomeClass the file some_class.rb will be opened. It also works for some plural forms, so pressing F3 over :my_messages will try to open my_message.rb.

Pressing F4 goes to the test file of the name under the cursor, or to the test file of the current document if no match was found for the previous search. So pressing F4 over SomeClass will open some_class_test.rb.

Download

ruby-jump_0.2.tar.gz – Extract the contents of the file in /home/youruser/.gnome2/gedit/plugins

2 Responses to 'Ruby-Jump plugin for gedit'

Subscribe to comments with RSS or TrackBack to 'Ruby-Jump plugin for gedit'.

  1. mann said,

    on June 30th, 2010 at 1:12 am

    Hi Ary,

    If I have made a few jump using F3 key, how could I get back to previous location?

  2. ary said,

    on June 30th, 2010 at 4:31 am

    Mann,

    Just remember it and the go to that location… :-P

    No, seriously, the plugin doesn’t do that. Maybe it could…

Leave a Reply