diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-08-24 22:16:11 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-08-24 22:16:11 +0000 |
commit | 6e7c7f3a19341d51dc32d98dd434173688ddd5f4 (patch) | |
tree | 47bf7d7944d912a5ea62ba22a81636f419bec45a /runtime/syntax/eruby.vim | |
parent | 5bcb2eba3dd76390a0ceed33f2e69dbf8519be50 (diff) |
updated for version 7.0136v7.0136
Diffstat (limited to 'runtime/syntax/eruby.vim')
-rw-r--r-- | runtime/syntax/eruby.vim | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/runtime/syntax/eruby.vim b/runtime/syntax/eruby.vim new file mode 100644 index 0000000000..85b3cfb258 --- /dev/null +++ b/runtime/syntax/eruby.vim @@ -0,0 +1,62 @@ +" Vim syntax file +" Language: eRuby +" Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au> +" Info: $Id$ +" URL: http://vim-ruby.sourceforge.net +" Anon CVS: See above site +" Licence: GPL (http://www.gnu.org) +" Disclaimer: +" 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. +" ---------------------------------------------------------------------------- + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'eruby' +endif + +if version < 600 + so <sfile>:p:h/html.vim + syn include @rubyTop <sfile>:p:h/ruby.vim +else + runtime! syntax/html.vim + unlet b:current_syntax + syn include @rubyTop syntax/ruby.vim +endif + +syn region erubyOneLiner matchgroup=erubyDelimiter start="^\s*\zs%" end="$" contains=@rubyTop,erubyDelimiter keepend +syn region erubyBlock matchgroup=erubyDelimiter start="<%=\=" end="%>" contains=@rubyTop containedin=ALLBUT,erubyComment keepend +syn region erubyComment matchgroup=erubyDelimiter start="<%#" end="%>" keepend + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_eruby_syntax_inits") + if version < 508 + let did_ruby_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink erubyDelimiter Delimiter + HiLink erubyComment Comment + + delcommand HiLink +endif +let b:current_syntax = "eruby" + +if main_syntax == 'eruby' + unlet main_syntax +endif + +" vim: sw=2 sts=2 ts=8 ff=unix nowrap: |