Working with Ruby On Rails I've had to write code using HAML . I do not particularly like very much (among other things it does not support multiline correct identity because no plain text strings, because it adds another layer of interpretation, application, etc) but when it comes to use it is good to do with good support. And when I say support I mean the syntax highlighting. To write code
usually use a text editor (Gedit or Geany), so in this recipe will explain how to add support for syntax highlighting in Gedit.
First add support for the commonly used extensions are recognized Rails by the system. Open a terminal and type: wget
Then add the syntax definition files in the folder sourceview GTK running: wget
Now with our favorite text editor (as root) open the file / usr/share/gtksourceview-2.0 / language-specs/ruby.lang Sourceview to modify the GTK and add support for new extensions. We look for the line:
And change it to:
Finally, open the file / usr / share/gtksourceview-2.0/language-specs/html.lang and look for the line that says:
And change it to:
close all instances of Gedit and open again and our code HAML should be highlighted.
recipes
There a number of plugins installed (with support for haml, RJS, etc) and you leave the Gedit as TextMate, but I do not like TextMate and then I'd rather do a duckling xD I hope
the recipe has been helpful to them.
References:
http://groups.google.com/group/haml/browse_thread/thread/6c8babd81a46b6b8/b5100d80d9182c71?pli=1
http://blog.adsdevshop.com/2008/04/19/ erb-syntax-highlighting-in-gedit /
usually use a text editor (Gedit or Geany), so in this recipe will explain how to add support for syntax highlighting in Gedit.
First add support for the commonly used extensions are recognized Rails by the system. Open a terminal and type: wget
http://dl.dropbox.com/u/16349833/rails.xml
rails.xml sudo cp / usr / share / mime / packages / sudo update-
rails.xml mime-database / usr / share / mime
Then add the syntax definition files in the folder sourceview GTK running: wget
http://dl.dropbox.com/u/16349833/gedit_rails_syntax. gedit_rails_syntax.zip
sudo unzip zip-d / usr/share/gtksourceview-2.0/language-specs
Now with our favorite text editor (as root) open the file / usr/share/gtksourceview-2.0 / language-specs/ruby.lang Sourceview to modify the GTK and add support for new extensions. We look for the line:
*. rb
And change it to:
*. rb, *. rake; *. RJS
Finally, open the file / usr / share/gtksourceview-2.0/language-specs/html.lang and look for the line that says:
*.. html, *. htm
And change it to:
* . html, *. htm, *. erb; *. RHTML
close all instances of Gedit and open again and our code HAML should be highlighted.
recipes
There a number of plugins installed (with support for haml, RJS, etc) and you leave the Gedit as TextMate, but I do not like TextMate and then I'd rather do a duckling xD I hope
the recipe has been helpful to them.
References:
http://groups.google.com/group/haml/browse_thread/thread/6c8babd81a46b6b8/b5100d80d9182c71?pli=1
http://blog.adsdevshop.com/2008/04/19/ erb-syntax-highlighting-in-gedit /
0 comments:
Post a Comment