Deprecated: Return type of Requests_Cookie_Jar::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/www/vhosts/jasonnoble.org/htdocs/wordpress/wp-includes/Requests/Cookie/Jar.php on line 63

Deprecated: Return type of Requests_Cookie_Jar::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/www/vhosts/jasonnoble.org/htdocs/wordpress/wp-includes/Requests/Cookie/Jar.php on line 73

Deprecated: Return type of Requests_Cookie_Jar::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/www/vhosts/jasonnoble.org/htdocs/wordpress/wp-includes/Requests/Cookie/Jar.php on line 89

Deprecated: Return type of Requests_Cookie_Jar::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/www/vhosts/jasonnoble.org/htdocs/wordpress/wp-includes/Requests/Cookie/Jar.php on line 102

Deprecated: Return type of Requests_Cookie_Jar::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/www/vhosts/jasonnoble.org/htdocs/wordpress/wp-includes/Requests/Cookie/Jar.php on line 111

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/www/vhosts/jasonnoble.org/htdocs/wordpress/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 40

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/www/vhosts/jasonnoble.org/htdocs/wordpress/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 51

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/www/vhosts/jasonnoble.org/htdocs/wordpress/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 68

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/www/vhosts/jasonnoble.org/htdocs/wordpress/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 82

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/www/vhosts/jasonnoble.org/htdocs/wordpress/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 91
Making TextMate recognize .html.erb files – Jason Noble's Technical Adventures

Making TextMate recognize .html.erb files

Posted by Jason Noble on 09/21/2008 in ruby, ruby on rails, textmate |

I’m using TextMate to edit some Ruby on Rails code. I noticed that when I edit the view pages (i.e. index.html.erb) it does not do syntax highlighting. It turns out this is because the Ruby on Rails TextMate bundle thinks that ruby view pages are .rhtml, which is the old Ruby on Rails format.

You can fix this by editing the Ruby on Rails language bundle.

In TextMate, select Bundles -> Bundle Editor -> Edit Languages.

This will open a new Bundle Editor Window. Click the arrow next to Ruby on Rails and highlight HTML (Rails). In the code that appears on the right, change the following

[text]
fileTypes = ( ‘rhtml’);
[/text]

to

[text]
fileTypes = (‘rhtml’, ‘html.erb’);
[/text]

Click the red X in the upper left corner to close the Bundle Editor Window.

Close any existing .html.erb files, when you open them again, they will have ruby syntax highlighting.

Copyright © 2008-2023 Jason Noble's Technical Adventures All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.