Skip to content


Subversion checkout URL

You can clone with
Download ZIP
gtksourceview language specifications for Ruby/Web devoloper's gedit
Branch: master
Failed to load latest commit information.
ruby.lang-extras ruby: fix/improve array/hash/bracket detection
.gitignore add basic gitignore
README.rdoc ruby: greatly improved bracket/hash/array matching
erb.lang ruby: erb: fix a ruby vs erb bug
html-erb.lang html-erb: fix bug that erb output-tags somestimes don't get recognized
ruby-bundler-gemfile-lock.lang add bundler Gemfile.lock spec
ruby-erb.lang erb: refactor, use erb.lang main file in sub files
ruby.lang ruby fix unhighlighted keywords
xml-erb.lang erb: fix xml
yml-erb.lang add .yaml.erb & erb tweaks


Ruby/Rails/Web related gedit/gtksourceview language definitions.

Part of RubyBuntuGedit


Contains various language specs needed by Ruby/Rails/Web developers and also tries to maintain them.

  • The Ruby language specification has been improved a lot. It uses 1.9.2 as reference implementation, recognizes many Ruby-specific language constructs (that can be highlighted differently) and implements many language details. To see all these changes, you need a style that supports (“uses”) the new specification, for example, these styles. See below for a changelog summary.

  • ERB is not only usable with HTML, but also with JavaScript, YAML and XML…

  • Gemfile.lock highlighting


You should also use up-to-date mime types.

as root

sudo cp *.lang /usr/share/gtksourceview-2.0/language-specs
# you can also delete the rhtml.lang (now done via html-erb)
sudo rm -f /usr/share/gtksourceview-2.0/language-specs/rhtml.lang
# and the ruby_on_rails.lang (except you want to have rails highlighting with an extra language..)
sudo rm -f /usr/share/gtksourceview-2.0/language-specs/ruby_on_rails.lang

as non-root

mkdir -p ~/.local/share/gtksourceview-2.0/language-specs
cp *.lang ~/.local/share/gtksourceview-2.0/language-specs
# you can also delete the rhtml.lang (now done via html-erb)
rm -f ~/.local/share/gtksourceview-2.0/language-specs/rhtml.lang
# and the ruby_on_rails.lang (except you want to have rails highlighting with an extra language..)
rm -f ~/.local/share/gtksourceview-2.0/language-specs/ruby_on_rails.lang



  • Uses 1.9 as reference implementation

  • No Rails keywords, no extra language for Rails

  • Refactored/updated keyword and builtin detection, highlight important constants and methods

  • Improved function definition highlighting

  • More logical style mappings (which also means: current styles are not fully ruby:compatible)

  • Fix string interpolations

  • Better support for advanced literals (e.g. `%x[]`, `%r<>`, …)

  • Support Arrays & Hashes (inclusive 1.9 symbol syntax)

  • Different heredoc matching

  • Better symbol detection

  • Small language details, like recognizing `__END__`

  • Better unicode support

  • See `git log` for full details

  • Based on

ruby.lang - Advanced TODOs [not (easily) possible with gtksourceview]

  • Improve heredocs (e.g. nested ones)

  • Different colorizations for “end”s (e.g. def/begin, class/module, while/until, if/case, block), needs to detect modifier statements correctly :/

  • Detect (multi-line) yard doc tag values

  • Add escapable char for generic string delimiters

  • Advanced regex highlighting + multi-line regexes

  • ruby.lang-extras/known-bugs.rb

Languages to add/import/update



  • HAML

  • SLIM

  • YAML


Meanwhile, you can, for example, use the ones found in gmate


  • RDOC markup support (and cross-referencing in ruby)


Something went wrong with that request. Please try again.