开发者

Getting .js.erb files to use the javascript editor in textmate

Right now, Textmate uses .erb for this, which means it treats it like a html editor

When i click on the option below to change it, ALL views (.html.erb) are changed to javascript edi开发者_运维知识库ting

How do i change it to javascript just for the file type .js.erb?


This article describes the method that TextMate uses to determine file type:

http://blog.macromates.com/2007/file-type-detection-rspec-rails/

In my setup js.erb files are automatically picked up as JavaScript (Rails) file type. Try opening up the Bundle Editor and navigate to the language definition for "JavaScript (Rails)", you should see a line in there defining file types:

fileTypes = ( 'js.erb' );

If 'js.erb' is not there then try adding it.

I don't remember having to do this manually myself but a quick test confirms that it does control the file type mapping for this kind of file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜