Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i set syntax highlight in gedit for html.erb file as ruby file?

How can i set syntax highlight in gedit for html.erb file as ruby file?

I tried these, doesn't work. Syntax highlighting in gedit not working automatically

like image 740
railshero Avatar asked Jul 11 '11 02:07

railshero


People also ask

Is it possible to get assembly highlighting code in gedit?

For those who need it, here it is a simple solution to obtain Assembly highlighting code in Gedit (that basic is not supported). That's it! You're welcome!

How do I highlight the syntax in the text editor?

Gedit (the default text editor) using GTKSourceView for it's syntax highlighting. It uses XML files to define how to highlight different syntax. There is a tutorial and a reference document on the GTKSourceView site.

How do I add a new language to gedit?

There is also a less in depth tutorial on the Gedit site. After you create your new language spec, restart gedit and it will automatically add it to its list of languages. I assume you are talking about gedit (labeled as "text editor" in the ubuntu menu).


2 Answers

Oh! I got the solution.

You need to install Gmate in Ubuntu. GMate is a collection of plugins, themes/styles and other improvements to get TextMate-like features in Gedit. Type the following commands to install Gmate.

sudo apt-add-repository ppa:ubuntu-on-rails/ppa
sudo apt-get update
sudo apt-get install gedit-gmate

When you are finished open your a .html.erb and voila! there it is.

More info visit https://github.com/gmate/gmate#readme

like image 97
Bernard Banta Avatar answered Sep 22 '22 13:09

Bernard Banta


You can change the highlighting preference from the drop-down list on the status bar. See if there is an option for RHTML present. If there isn't, you can follow this post to install it in: here. That's what I did, it works for me.

like image 26
Ankit Soni Avatar answered Sep 20 '22 13:09

Ankit Soni