[rspec-devel] [ rspec-Patches-11254 ] RSpec syntax coloring and function pop-up integration in TextMate

noreply at rubyforge.org noreply at rubyforge.org
Thu May 31 10:45:00 EDT 2007


Patches item #11254, was opened at 2007-05-31 14:43
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=11254&group_id=797

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Wincent Colaiuta (wincent)
Assigned to: Nobody (None)
Summary: RSpec syntax coloring and function pop-up integration in TextMate

Initial Comment:
This patch makes two additions to the RSpec TextMate bundle to provide a better user experience: syntax coloring of RSpec keywords (before, after, describe, it), and display of behaviours and examples in the function pop-up menu. This latter feature is very useful for navigation when working with files with large numbers of specs. Examples appear indented.

Now, this is my first ever TextMate customization so I am sure someone more experienced could improve on the implementation, but in its basic form it works. Shortcomings of the current implementation:

- recognition occurs at the whole-line level, so syntax colouring only kicks in once you have typed the entire line

- recognition simplisticly divides the behaviour and example descriptions into three parts, the "describe" (or "it"), the "do", and "everything else" between the two

- this in turn means that there is no special syntax colouring of the "everything else"

- it also means that examples such as:

    it "should be valid" do
    ...
    end

will appear in the function pop-up with the enclosing quotes:

    "should be valid"

- likewise, a behaviour like:

    describe User, "at creation time" do
    ...
    end

Will appear in the function pop-up as:

    User, "at creation time"

- and shared behaviours will appear as:

    "All controllers", :shared => true

Hopefully someone with more knowledge about TextMate customization than I can address these issues, but as it stands I think the basic implementation is useful enough that life is better with the aid of these imperfect changes.

Will also try to attach a screenshot with the patch to show what the pop-up looks like.


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=11254&group_id=797


More information about the rspec-devel mailing list