diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2014-11-11 02:37:21 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2014-11-11 02:37:21 +0100 |
commit | 617b01a5b6aa3cadb25b2ff8639e330cfc6cf3c1 (patch) | |
tree | 97fc653e0c19839490bd7aac6beeb4f5754155be /syntax/toml.vim | |
parent | bd35da8e9ca0bddd95539bef0c8f4857dc4cc746 (diff) | |
download | vim-polyglot-617b01a5b6aa3cadb25b2ff8639e330cfc6cf3c1.tar.gz vim-polyglot-617b01a5b6aa3cadb25b2ff8639e330cfc6cf3c1.zip |
Updatev1.10.3
Diffstat (limited to 'syntax/toml.vim')
-rw-r--r-- | syntax/toml.vim | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/syntax/toml.vim b/syntax/toml.vim index 8be0b3f0..a7c4bc5b 100644 --- a/syntax/toml.vim +++ b/syntax/toml.vim @@ -7,10 +7,22 @@ if exists("b:current_syntax") finish endif -syn match tomlEscape /\\[0tnr"\\]/ display +syn match tomlEscape /\\[btnfr"/\\]/ display contained +syn match tomlEscape /\\u\x\{4}/ contained +syn match tomlEscape /\\U\x\{8}/ contained hi def link tomlEscape SpecialChar -syn region tomlString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=tomlEscape +syn match tomlLineEscape /\\$/ contained +hi def link tomlLineEscape SpecialChar + +" Basic strings +syn region tomlString oneline start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=tomlEscape +" Multi-line basic strings +syn region tomlString start=/"""/ end=/"""/ contains=tomlEscape,tomlLineEscape +" Literal strings +syn region tomlString oneline start=/'/ end=/'/ +" Multi-line literal strings +syn region tomlString start=/'''/ end=/'''/ hi def link tomlString String syn match tomlInteger /\<-\?\d\+\>/ display @@ -25,8 +37,11 @@ hi def link tomlBoolean Boolean syn match tomlDate /\d\{4\}-\d\{2\}-\d\{2\}T\d\{2\}:\d\{2\}:\d\{2\}Z/ display hi def link tomlDate Constant -syn match tomlKeyGroup /^\s*\[.\+\]\s*\(#.*\)\?$/ contains=tomlComment -hi def link tomlKeyGroup Identifier +syn match tomlTable /^\s*\[[^#\[\]]\+\]\s*\(#.*\)\?$/ contains=tomlComment +hi def link tomlTable Identifier + +syn match tomlTableArray /^\s*\[\[[^#\[\]]\+\]\]\s*\(#.*\)\?$/ contains=tomlComment +hi def link tomlTableArray Identifier syn keyword tomlTodo TODO FIXME XXX BUG contained hi def link tomlTodo Todo |