Giter VIP home page Giter VIP logo

rubybuntu-language-specs's Introduction

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

Part of RubyBuntuGedit

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. 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.

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 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

MAYBE

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

J-_-L

rubybuntu-language-specs's People

Contributors

janlelis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.