Fix --force-device-scale-factor on Mac
[chromium-blink-merge.git] / tools / vim / mojom.vim
blob76a0ee3f2458f11c050a1911807d6765b2332671
1 " Vim syntax file " Language: Mojom
2 " To get syntax highlighting for .mojom files, add the following to your .vimrc
3 " file:
4 "     source /path/to/src/tools/vim/mojom.vim
6 if !exists("g:main_syntax")
7   if version < 600
8     syntax clear
9   elseif exists("b:current_syntax")
10     finish
11   endif
12   let g:main_syntax = 'mojom'
13   syntax region mojomFold start="{" end="}" transparent fold
14 endif
16 " keyword definitions
17 syntax keyword mojomType        bool int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double
18 syntax match mojomImport        "^\(import\)\s"
19 syntax keyword mojomModule      module
20 syntax keyword mojomKeyword     interface enum struct union
22 " Comments
23 syntax keyword mojomTodo           contained TODO FIXME XXX
24 syntax region  mojomComment        start="/\*"  end="\*/" contains=mojomTodo,mojomDocLink,@Spell
25 syntax match   mojomLineComment    "//.*" contains=mojomTodo,@Spell
26 syntax match   mojomLineDocComment "///.*" contains=mojomTodo,mojomDocLink,@Spell
27 syntax region  mojomDocLink        contained start=+\[+ end=+\]+
29 " The default highlighting.
30 highlight default link mojomTodo            Todo
31 highlight default link mojomComment         Comment
32 highlight default link mojomLineComment     Comment
33 highlight default link mojomLineDocComment  Comment
34 highlight default link mojomDocLink         SpecialComment
35 highlight default link mojomType            Type
36 highlight default link mojomImport          Include
37 highlight default link mojomKeyword         Keyword
39 let b:current_syntax = "mojom"
40 let b:spell_options = "contained"
42 if g:main_syntax is# 'mojom'
43   unlet g:main_syntax
44 endif