Permalink
Browse files

added Julien's changes to scala.vim

  • Loading branch information...
1 parent 6edb2c0 commit 0af8c771b735902cf06c2e28354a18a072254bae michelou committed Jun 14, 2007
Showing with 12 additions and 8 deletions.
  1. +3 −2 indent/scala.vim
  2. +9 −6 syntax/scala.vim
View
@@ -1,7 +1,8 @@
" Vim indent file
-" Language: Scala
-" Maintainer: Stefan Matthias Aust
+" Language : Scala (http://scala-lang.org/)
+" Maintainer : Stefan Matthias Aust
" Last Change: 2006 Apr 13
+" Revision : $Id$
if exists("b:did_indent")
finish
View
@@ -1,7 +1,8 @@
" Vim syntax file
-" Language: Scala
+" Language : Scala (http://scala-lang.org/)
" Maintainers: Stefan Matthias Aust, Julien Wetterwald
-" Last Change: 2007 May 29
+" Last Change: 2007 June 13
+" Revision : $Id$
if version < 600
syntax clear
@@ -71,15 +72,15 @@ syn match scalaEmptyString "\"\""
" multi-line string literals
syn region scalaMultiLineString start="\"\"\"" end="\"\"\"" contains=scalaUnicode
syn match scalaUnicode "\\u[0-9a-fA-F]\{4}" contained
-syn match scalaMultiLineString "'[_a-zA-Z][_a-zA-Z0-9]*\>"
-syn match scalaMultiLineString "'[^'\\]'\|'\\.'"
" string literals with escapes
syn region scalaString start="\"[^"]" skip="\\\"" end="\"" contains=scalaStringEscape " TODO end \n or not?
syn match scalaStringEscape "\\u[0-9a-fA-F]\{4}" contained
syn match scalaStringEscape "\\[nrfvb\\\"]" contained
-syn match scalaString "'[_a-zA-Z][_a-zA-Z0-9]*\>"
-syn match scalaString "'[^'\\]'\|'\\.'"
+
+" symbol and character literals
+syn match scalaSymbol "'[_a-zA-Z0-9][_a-zA-Z0-9]*\>"
+syn match scalaChar "'[^'\\]'\|'\\.'\|'\\u[0-9a-fA-F]\{4}'"
" number literals
syn match scalaNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>"
@@ -107,8 +108,10 @@ hi link scalaOperator Normal
hi link scalaNumber Number
hi link scalaEmptyString String
hi link scalaString String
+hi link scalaChar String
hi link scalaMultiLineString String
hi link scalaStringEscape Special
+hi link scalaSymbol Special
hi link scalaUnicode Special
hi link scalaComment Comment
hi link scalaLineComment Comment

0 comments on commit 0af8c77

Please sign in to comment.