Skip to content

Instantly share code, notes, and snippets.

@jrichter
Created October 3, 2009 22:04
Show Gist options
  • Save jrichter/200908 to your computer and use it in GitHub Desktop.
Save jrichter/200908 to your computer and use it in GitHub Desktop.
For erb text highlighting in gedit. put it here: /usr/share/gtksourceview-2.0/language-specs/
<?xml version="1.0" encoding="UTF-8"?>
<!--
This is a smashup by Justin Richter of html.lang and ruby.lang
html.lang
Authors: Marco Barisione, Emanuele Aina
Copyright (C) 2005-2007 Marco Barisione <[email protected]>
Copyright (C) 2005-2007 Emanuele Aina
ruby.lang
Author: Archit Baweja <[email protected]>
Copyright (C) 2004 Archit Baweja <[email protected]>
Copyright (C) 2005 Michael Witrant <[email protected]>
Copyright (C) 2006 Gabriel Bauman <[email protected]>
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-->
<language id="erb" _name="Ruby(ERB/RHTML)" version="2.0" _section="Scripts">
<metadata>
<property name="mimetypes">application/x-ruby;text/x-ruby</property>
<property name="globs">*.erb;*.rhtml</property>
<property name="line-comment-start">#</property>
</metadata>
<styles>
<style id="escape" _name="Escaped Character" map-to="def:special-char"/>
<style id="comment" _name="Comment" map-to="def:comment"/>
<style id="attribute-definition" _name="Attribute Definition" map-to="def:statement"/>
<style id="module-handler" _name="Module handler" map-to="def:preprocessor"/>
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
<style id="nil-value" _name="Nil Constant" map-to="def:special-constant"/>
<style id="boolean" _name="Boolean value" map-to="def:boolean"/>
<style id="floating-point" _name="Floating point number" map-to="def:floating-point"/>
<style id="decimal" _name="Decimal number" map-to="def:decimal"/>
<style id="base-n-integer" _name="Base-N number" map-to="def:base-n-integer"/>
<style id="numeric-literal" _name="Numeric literal" map-to="def:base-n-integer"/>
<style id="string" _name="String" map-to="def:string"/>
<style id="builtin" _name="Builtin" map-to="def:type"/>
<style id="constant" _name="Constant" map-to="def:type"/>
<style id="symbol" _name="Symbol" map-to="def:string"/>
<style id="special-variable" _name="Special Variable" map-to="def:identifier"/>
<style id="predefined-variable" _name="Predefined Variable" map-to="def:identifier"/>
<style id="variable" _name="Variable" map-to="def:identifier"/>
<style id="here-doc" _name="Heredoc" map-to="def:string" />
<style id="here-doc-bound" _name="Heredoc Bound" map-to="def:string"/>
<style id="regex" _name="Regular Expression" map-to="def:identifier"/>
<style id="tag" _name="Tag" map-to="xml:element-name"/>
<style id="attrib-name" _name="Attribute Name" map-to="xml:attribute-name"/>
<style id="attrib-value" _name="Attribute Value" map-to="xml:attribute-value"/>
<style id="dtd" _name="DTD" map-to="xml:doctype"/>
<style id="error" _name="Error" map-to="xml:error"/>
</styles>
<definitions>
<context id="escape" style-ref="escape">
<match>\\((0-7){3}|(x[a-fA-F0-9]{2})|(c\S)|([CM]-\S)|(M-C-\S)|.)</match>
</context>
<context id="multiline-comment" style-ref="comment">
<start>^=begin</start>
<end>^=end</end>
<include>
<context ref="escape"/>
<context ref="def:in-comment"/>
</include>
</context>
<context id="attribute-definitions" style-ref="attribute-definition">
<keyword>attr</keyword>
<keyword>attr_writer</keyword>
<keyword>attr_reader</keyword>
<keyword>attr_accessor</keyword>
</context>
<context id="definitions" style-ref="keyword">
<!-- do not highlight the .class method -->
<prefix>(?&lt;![\w\.])</prefix>
<keyword>alias</keyword>
<keyword>class</keyword>
<keyword>module</keyword>
<keyword>def</keyword>
<keyword>undef</keyword>
</context>
<context id="module-handlers" style-ref="module-handler">
<keyword>require</keyword>
<keyword>include</keyword>
<keyword>load</keyword>
</context>
<context id="keywords" style-ref="keyword">
<keyword>BEGIN</keyword>
<keyword>END</keyword>
<keyword>and</keyword>
<keyword>begin</keyword>
<keyword>break</keyword>
<keyword>case</keyword>
<keyword>catch</keyword>
<keyword>defined?</keyword>
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>elsif</keyword>
<keyword>end</keyword>
<keyword>ensure</keyword>
<keyword>for</keyword>
<keyword>if</keyword>
<keyword>in</keyword>
<keyword>next</keyword>
<keyword>not</keyword>
<keyword>or</keyword>
<keyword>private</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
<keyword>redo</keyword>
<keyword>rescue</keyword>
<keyword>retry</keyword>
<keyword>return</keyword>
<keyword>then</keyword>
<keyword>throw</keyword>
<keyword>unless</keyword>
<keyword>until</keyword>
<keyword>when</keyword>
<keyword>while</keyword>
<keyword>yield</keyword>
</context>
<context id="builtins" style-ref="builtin">
<keyword>ARGF</keyword>
<keyword>ARGV</keyword>
<keyword>Abbrev</keyword>
<keyword>ArgumentError</keyword>
<keyword>Array</keyword>
<keyword>Base64</keyword>
<keyword>Benchmark::Tms</keyword>
<keyword>Benchmark</keyword>
<keyword>Bignum</keyword>
<keyword>Binding</keyword>
<keyword>CGI::Cookie</keyword>
<keyword>CGI::HtmlExtension</keyword>
<keyword>CGI::QueryExtension</keyword>
<keyword>CGI::Session::FileStore</keyword>
<keyword>CGI::Session::MemoryStore</keyword>
<keyword>CGI::Session</keyword>
<keyword>CGI</keyword>
<keyword>Class</keyword>
<keyword>Comparable</keyword>
<keyword>Complex</keyword>
<keyword>ConditionVariable</keyword>
<keyword>Continuation</keyword>
<keyword>DATA</keyword>
<keyword>Data</keyword>
<keyword>Date</keyword>
<keyword>DateTime</keyword>
<keyword>Delegator</keyword>
<keyword>Dir</keyword>
<keyword>ENV</keyword>
<keyword>EOFError</keyword>
<keyword>ERB::Util</keyword>
<keyword>ERB</keyword>
<keyword>Enumerable::Enumerator</keyword>
<keyword>Enumerable</keyword>
<keyword>Errno</keyword>
<keyword>Exception</keyword>
<keyword>FalseClass</keyword>
<keyword>File::Constants</keyword>
<keyword>File::Stat</keyword>
<keyword>File</keyword>
<keyword>FileTest</keyword>
<keyword>FileUtils::DryRun</keyword>
<keyword>FileUtils::NoWrite</keyword>
<keyword>FileUtils::StreamUtils</keyword>
<keyword>FileUtils::Verbose</keyword>
<keyword>FileUtils</keyword>
<keyword>Find</keyword>
<keyword>Fixnum</keyword>
<keyword>Float</keyword>
<keyword>FloatDomainError</keyword>
<keyword>Forwardable</keyword>
<keyword>GC</keyword>
<keyword>Generator</keyword>
<keyword>Hash</keyword>
<keyword>IO</keyword>
<keyword>IOError</keyword>
<keyword>Iconv::BrokenLibrary</keyword>
<keyword>Iconv::Failure</keyword>
<keyword>Iconv::IllegalSequence</keyword>
<keyword>Iconv::InvalidCharacter</keyword>
<keyword>Iconv::InvalidEncoding</keyword>
<keyword>Iconv::OutOfRange</keyword>
<keyword>Iconv</keyword>
<keyword>IndexError</keyword>
<keyword>Integer</keyword>
<keyword>Interrupt</keyword>
<keyword>Kernel</keyword>
<keyword>LoadError</keyword>
<keyword>LocalJumpError</keyword>
<keyword>Logger::Application</keyword>
<keyword>Logger::Error</keyword>
<keyword>Logger::Formatter</keyword>
<keyword>Logger::LogDevice::LogDeviceMutex</keyword>
<keyword>Logger::LogDevice</keyword>
<keyword>Logger::Severity</keyword>
<keyword>Logger::ShiftingError</keyword>
<keyword>Logger</keyword>
<keyword>Marshal</keyword>
<keyword>MatchData</keyword>
<keyword>Math</keyword>
<keyword>Matrix</keyword>
<keyword>Method</keyword>
<keyword>Module</keyword>
<keyword>Mutex</keyword>
<keyword>NameError::message</keyword>
<keyword>NameError</keyword>
<keyword>NilClass</keyword>
<keyword>NoMemoryError</keyword>
<keyword>NoMethodError</keyword>
<keyword>NotImplementedError</keyword>
<keyword>Numeric</keyword>
<keyword>Object</keyword>
<keyword>ObjectSpace</keyword>
<keyword>Observable</keyword>
<keyword>PStore::Error</keyword>
<keyword>PStore</keyword>
<keyword>Pathname</keyword>
<keyword>Precision</keyword>
<keyword>Proc</keyword>
<keyword>Process::GID</keyword>
<keyword>Process::Status</keyword>
<keyword>Process::Sys</keyword>
<keyword>Process::UID</keyword>
<keyword>Process</keyword>
<keyword>Queue</keyword>
<keyword>RUBY_PLATFORM</keyword>
<keyword>RUBY_RELEASE_DATE</keyword>
<keyword>RUBY_VERSION</keyword>
<keyword>Range</keyword>
<keyword>RangeError</keyword>
<keyword>Rational</keyword>
<keyword>Regexp</keyword>
<keyword>RegexpError</keyword>
<keyword>RuntimeError</keyword>
<keyword>STDERR</keyword>
<keyword>STDIN</keyword>
<keyword>STDOUT</keyword>
<keyword>ScriptError</keyword>
<keyword>SecurityError</keyword>
<keyword>Set</keyword>
<keyword>Shellwords</keyword>
<keyword>Signal</keyword>
<keyword>SignalException</keyword>
<keyword>SimpleDelegator</keyword>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment