[TxMt] Scope and Snippets

Allan Odgaard throw-away-1 at macromates.com
Mon Oct 24 15:06:55 UTC 2005


On 24/10/2005, at 17.01, Ana Nelson wrote:

> I'm having a bit of trouble figuring out how scope is determined by  
> TextMate.

http://macromates.com/blog/archives/2005/07/06/introduction-to-scopes/

> What has to happen for "source.ruby.rails" to be active?

You need to switch to “Ruby on Rails” as language. View -> Language - 
 > Rails -> Ruby on Rails.

> I am working in documents with .rb and .rhtml extensions

For .rhtml it should identify them as HTML (Rails) (visible in the  
status bar), but if not, it's View -> Language -> Rails -> HTML (Rails).

> but unless I remove the Scope condition I can't get the Rails  
> snippets to be active.

You can btw press ctrl-shift P to view the current scope. For .rb  
files it is (out-of-the-box) source.ruby. Switching to Ruby on Rails  
as language makes it source.ruby.rails.






More information about the textmate mailing list