Permalink
Browse files

Improve syntax highlighting

  • Loading branch information...
1 parent edda7e2 commit 67b25d1952268594adca3ae1976e557f1ae8c5fc @rodjek committed May 11, 2011
Showing with 7 additions and 8 deletions.
  1. +1 −3 ftdetect/puppet.vim
  2. +6 −5 syntax/puppet.vim
View
4 ftdetect/puppet.vim
@@ -1,3 +1 @@
-augroup filetypedetect
- au! BufRead,BufNewFile *.pp setfiletype puppet
-augroup END
+au! BufRead,BufNewFile *.pp setfiletype puppet
View
11 syntax/puppet.vim
@@ -21,9 +21,9 @@ syn keyword puppetDefType class define site node inherits contained
syn keyword puppetInherits inherits contained
syn region puppetDefArguments start="(" end=")" contains=puppetArgument
syn match puppetArgument "\w\+" contained
-syn match puppetDefName "\w\+" contained
+syn match puppetDefName "\(\w\|\:\)\+" contained
-syn match puppetInstance "\w\+\s*{" contains=puppetTypeBrace,puppetTypeName,puppetTypeDefault
+syn match puppetInstance "\(\w\|\:\)\+\s*{" contains=puppetTypeBrace,puppetTypeName,puppetTypeDefault
syn match puppetTypeBrace "{" contained
syn match puppetTypeName "[a-z]\w*" contained
syn match puppetTypeDefault "[A-Z]\w*" contained
@@ -39,6 +39,7 @@ syn match puppetBrace "{"
syn match puppetBrace "}"
syn region puppetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=puppetVariable
+syn region puppetString start=+'+ skip=+\\\\\|\\"+ end=+'+
syn keyword puppetBoolean true false
syn keyword puppetKeyword import inherits include
@@ -68,9 +69,9 @@ if version >= 508 || !exists("did_puppet_syn_inits")
HiLink puppetComment Comment
HiLink puppetString String
HiLink puppetTodo Todo
-" HiLink puppetBrace Delimiter
-" HiLink puppetTypeBrace Delimiter
-" HiLink puppetParen Delimiter
+ HiLink puppetBrace Delimiter
+ HiLink puppetTypeBrace Delimiter
+ HiLink puppetParen Delimiter
HiLink puppetDelimiter Delimiter
HiLink puppetControl Statement
HiLink puppetDefType Define

0 comments on commit 67b25d1

Please sign in to comment.