authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2015-12-09 12:32:33-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2015-12-09 12:32:33-07:00
log28debf1fc3b1b3049dd9959fb7ecbd874a5f8084
treec908e0a8eb7a1ae39138410fe715f527e029774e
parent367ea908bdc9a9dff04b00bafd8d7df5f6dfcbde

doc: update vim syntax


1 files changed, 22 insertions(+), 1 deletions(-)

doc/vim/syntax/zig.vim+22-1
......@@ -7,9 +7,21 @@ if exists("b:current_syntax")
77 finish
88endif
99
10syn keyword zigKeyword fn return mut const extern unreachable export pub as use if else let void goto
10syn keyword zigKeyword fn return mut const extern unreachable export pub as use while
11syn keyword zigKeyword if else let void goto type enum struct continue break match
1112syn keyword zigType bool i8 u8 i16 u16 i32 u32 i64 u64 isize usize f32 f64 f128
1213
14syn keyword zigConstant null
15
16syn keyword zigBoolean true false
17
18syn match zigDecNumber display "\<[0-9][0-9_]*\%([iu]\%(size\|8\|16\|32\|64\)\)\="
19syn match zigHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
20syn match zigOctNumber display "\<0o[0-7_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
21syn match zigBinNumber display "\<0b[01_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
22
23syn match zigShebang /\%^#![^[].*/
24
1325syn region zigCommentLine start="//" end="$" contains=zigTodo,@Spell
1426syn region zigCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=zigTodo,@Spell
1527syn region zigCommentBlock matchgroup=zigCommentBlock start="/\*\%(!\|\*[*/]\@!\)\@!" end="\*/" contains=zigTodo,zigCommentBlockNest,@Spell
......@@ -30,8 +42,14 @@ syn region zigString start='b\?r\z(#*\)"' end='"\z1' contains=@Spell
3042
3143let b:current_syntax = "zig"
3244
45hi def link zigDecNumber zigNumber
46hi def link zigHexNumber zigNumber
47hi def link zigOctNumber zigNumber
48hi def link zigBinNumber zigNumber
49
3350hi def link zigKeyword Keyword
3451hi def link zigType Type
52hi def link zigShebang Comment
3553hi def link zigCommentLine Comment
3654hi def link zigCommentLineDoc SpecialComment
3755hi def link zigCommentBlock zigCommentLine
......@@ -42,3 +60,6 @@ hi def link zigString String
4260hi def link zigEscape Special
4361hi def link zigEscapeUnicode zigEscape
4462hi def link zigEscapeError Error
63hi def link zigBoolean Boolean
64hi def link zigConstant Constant
65hi def link zigNumber Number