[rspec-users] TextMate language bindings/modes

Ben Mabey ben at benmabey.com
Fri Jun 27 16:03:21 EDT 2008


Christopher Bailey wrote:
> I'm wondering if anyone has TextMate working really smoothly where it
> properly sets the language binding for the given type of file, in
> relation to Rails, RSpec, RSpec Plain Text Story, RSpec Story Runner,
> and RSpec Story Steps files?  Mine seems to get confused easily, and
> I'd like to figure out if there's a solid way to specify which binding
> to use for what files, etc.?
>
> Currently, it seems to detect the Plain Text Story files fine.  But,
> it is not detecting steps files or the story runner files.  From what
> I can tell, I've named these according to the usual rules.  e.g. for
> steps files, I have them in .../stories/steps/theme_steps.rb for
> example.  And for the plain text story and matching runner file, I
> have .../stories/themes_story and .../stories/themes_story.rb.
>
> Further, if I manually set a file to RSpec Story Runner, then after
> that every .rb file I open will be that way.  It seems this is one of
> the core problems - the ".rb" binding is greedy - whoever sets it last
> sets it for everything, and anytime it changes, it changes for all.
>
>   
Christopher,
In the past I have had my bindings messed up so that all my ruby files 
were treated as rspec files.  This post walks through how you can reset 
your bindings:
http://blog.macromates.com/2007/file-type-detection-rspec-rails/

Hope that helps,
Ben


More information about the rspec-users mailing list