annotate runtime/syntax/vroom.vim @ 8247:6ee794dc950e v7.4.1416

commit https://github.com/vim/vim/commit/669cac0a805333e69b9e1176425083914eada659 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Feb 25 15:25:03 2016 +0100 patch 7.4.1416 Problem: Using "u_char" intead of "char_u", which doesn't work everywhere. (J?rg Plate) Solution: Use "char_u" always.
author Christian Brabandt <cb@256bit.org>
date Thu, 25 Feb 2016 15:30:05 +0100
parents 1e8ebf870720
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6091
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 " Language: Vroom (vim testing and executable documentation)
6153
1e8ebf870720 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 6091
diff changeset
3 " Maintainer: David Barnett (https://github.com/google/vim-ft-vroom)
6091
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 " Last Change: 2014 Jul 23
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 " For version 5.x: Clear all syntax items.
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 " For version 6.x and later: Quit when a syntax file was already loaded.
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 if v:version < 600
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 syntax clear
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 elseif exists('b:current_syntax')
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 finish
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 endif
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 let s:cpo_save = &cpo
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 set cpo-=C
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 syn include @vroomVim syntax/vim.vim
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 syn include @vroomShell syntax/sh.vim
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 syntax region vroomAction
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 \ matchgroup=vroomOutput
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 \ start='\m^ ' end='\m$' keepend
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 \ contains=vroomControlBlock
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 syntax region vroomAction
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 \ matchgroup=vroomOutput
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 \ start='\m^ & ' end='\m$' keepend
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 \ contains=vroomControlBlock
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 syntax match vroomOutput '\m^ &$'
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 syntax region vroomMessageBody
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 \ matchgroup=vroomMessage
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 \ start='\m^ \~ ' end='\m$' keepend
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 \ contains=vroomControlBlock
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 syntax region vroomColoredAction
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 \ matchgroup=vroomInput
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 \ start='\m^ > ' end='\m$' keepend
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 \ contains=vimNotation,vroomControlBlock
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 syntax region vroomAction
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 \ matchgroup=vroomInput
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 \ start='\m^ % ' end='\m$' keepend
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 \ contains=vimNotation,vroomControlBlock
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 syntax region vroomAction
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 \ matchgroup=vroomContinuation
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 \ start='\m^ |' end='\m$' keepend
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 syntax region vroomAction
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 \ start='\m^ \ze:' end='\m$' keepend
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 \ contains=@vroomVim,vroomControlBlock
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55 syntax region vroomAction
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 \ matchgroup=vroomDirective
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 \ start='\m^ @\i\+' end='\m$' keepend
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 \ contains=vroomControlBlock
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 syntax region vroomSystemAction
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 \ matchgroup=vroomSystem
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 \ start='\m^ ! ' end='\m$' keepend
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 \ contains=@vroomShell,vroomControlBlock
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 syntax region vroomHijackAction
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 \ matchgroup=vroomHijack
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 \ start='\m^ \$ ' end='\m$' keepend
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 \ contains=vroomControlBlock
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 syntax match vroomControlBlock contains=vroomControlEscape,@vroomControls
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
71 \ '\v \([^&()][^()]*\)$'
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
72
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 syntax match vroomControlEscape '\m&' contained
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
75 syntax cluster vroomControls
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76 \ contains=vroomDelay,vroomMode,vroomBuffer,vroomRange
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77 \,vroomChannel,vroomBind,vroomStrictness
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78 syntax match vroomRange '\v\.(,\+?(\d+|\$)?)?' contained
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 syntax match vroomRange '\v\d*,\+?(\d+|\$)?' contained
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
80 syntax match vroomBuffer '\v\d+,@!' contained
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81 syntax match vroomDelay '\v\d+(\.\d+)?s' contained
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82 syntax match vroomMode '\v<%(regex|glob|verbatim)' contained
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 syntax match vroomChannel '\v<%(stderr|stdout|command|status)>' contained
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84 syntax match vroomBind '\v<bind>' contained
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
85 syntax match vroomStrictness '\v\<%(STRICT|RELAXED|GUESS-ERRORS)\>' contained
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
86
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
87 highlight default link vroomInput Identifier
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
88 highlight default link vroomDirective vroomInput
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
89 highlight default link vroomControlBlock vroomInput
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
90 highlight default link vroomSystem vroomInput
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
91 highlight default link vroomOutput Statement
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
92 highlight default link vroomContinuation Constant
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
93 highlight default link vroomHijack Special
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
94 highlight default link vroomColoredAction Statement
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
95 highlight default link vroomSystemAction vroomSystem
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
96 highlight default link vroomHijackAction vroomHijack
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
97 highlight default link vroomMessage vroomOutput
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
98 highlight default link vroomMessageBody Constant
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
99
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
100 highlight default link vroomControlEscape Special
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
101 highlight default link vroomBuffer vroomInput
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
102 highlight default link vroomRange Include
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
103 highlight default link vroomMode Constant
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
104 highlight default link vroomDelay Type
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
105 highlight default link vroomStrictness vroomMode
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
106 highlight default link vroomChannel vroomMode
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
107 highlight default link vroomBind vroomMode
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
108
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
109 let b:current_syntax = 'vroom'
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
110
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
111
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
112 let &cpo = s:cpo_save
7090d7f160f7 Update runtime files. Add vroom file support.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
113 unlet s:cpo_save