https://github.com/janlelis/rubybuntu-language-specs
gtksourceview language specifications for Ruby/Web devoloper's gedit
https://github.com/janlelis/rubybuntu-language-specs
gedit gtksourceview ruby syntax-highlighting
Last synced: 5 months ago
JSON representation
gtksourceview language specifications for Ruby/Web devoloper's gedit
- Host: GitHub
- URL: https://github.com/janlelis/rubybuntu-language-specs
- Owner: janlelis
- Created: 2011-08-10T19:20:52.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2011-11-01T14:48:09.000Z (over 14 years ago)
- Last Synced: 2024-05-08T18:19:14.762Z (about 2 years ago)
- Topics: gedit, gtksourceview, ruby, syntax-highlighting
- Language: Ruby
- Homepage:
- Size: 203 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
Awesome Lists containing this project
README
= Ruby/Rails/Web related gedit/gtksourceview language definitions.
Part of {RubyBuntuGedit}[https://github.com/janlelis/rubybuntu-gedit]
== Features
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}[https://github.com/janlelis/rubybuntu-editor-styles]. See below for a changelog summary.
* ERB is not only usable with HTML, but also with JavaScript, YAML and XML...
* Gemfile.lock highlighting
== Setup
You should also use up-to-date {mime types}[https://github.com/janlelis/rubybuntu-mime].
=== 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
== CHANGES
=== ruby.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 https://github.com/gmate/gmate/blob/master/lang-specs/ruby_on_rails.lang
== 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
* SASS / SCSS / CSS
* COFFEE
* HAML
* SLIM
* YAML
* CUCUMBER
Meanwhile, you can, for example, use the ones found in gmate[https://github.com/gmate/gmate/tree/master/lang-specs]
== MAYBE
* RDOC markup support (and cross-referencing in ruby)
== J-_-L