annotate runtime/syntax/gitolite.vim @ 3237:91e53bcb7946

Updated runtime files.
author Bram Moolenaar <bram@vim.org>
date Fri, 30 Dec 2011 13:11:27 +0100
parents 8b8ef1fed009
children 3b26420fc639
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3153
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 " Language: gitolite configuration
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 " URL: https://github.com/tmatilai/gitolite.vim
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 " Maintainer: Teemu Matilainen <teemu.matilainen@iki.fi>
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3224
diff changeset
5 " Last Change: 2011-12-25
3153
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 if exists("b:current_syntax")
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 finish
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 endif
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3224
diff changeset
11 let s:cpo_save = &cpo
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3224
diff changeset
12 set cpo&vim
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3224
diff changeset
13
3153
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 " Comment
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 syn match gitoliteComment "\(^\|\s\)#.*" contains=gitoliteTodo
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 syn keyword gitoliteTodo TODO FIXME XXX NOT contained
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 " Groups, users and repos
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 syn match gitoliteGroupDef "\(^\s*\)\@<=@[^=]\{-1,}\(\s*=\)\@=" contains=gitoliteSpaceError,gitoliteUserError nextgroup=gitoliteGroupDefSep
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 syn match gitoliteGroupDefSep "\s*=" contained nextgroup=gitoliteRepoLine
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 syn match gitoliteRepoDef "^\s*repo\s" nextgroup=gitoliteRepoLine
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 syn match gitoliteRepoLine ".*" contained transparent contains=gitoliteGroup,gitoliteWildRepo,gitoliteCreator,gitoliteExtCmdHelper,gitoliteRepoError,gitoliteComment
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 syn match gitoliteUserLine ".*" contained transparent contains=gitoliteGroup,gitolitePreProc,gitoliteUserError,gitoliteComment
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25
3224
8b8ef1fed009 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
26 syn match gitoliteWildRepo "[ \t=]\@<=[^ \t]*[\\^$|()[\]*?{},][^ \t]*" contained contains=gitoliteCreator,gitoliteRepoError
3153
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 syn match gitoliteGroup "[ \t=]\@<=@[^ \t]\+" contained contains=gitoliteUserError
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 syn keyword gitoliteCreator CREATER CREATOR contained
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 syn keyword gitolitePreProc CREATER CREATOR READERS WRITERS contained
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 syn match gitoliteExtCmdHelper "[ \t=]\@<=EXTCMD/" contained nextgroup=gitoliteExtCmd
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 syn match gitoliteExtCmd "rsync\(\s\|$\)" contained
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 " Illegal characters
3224
8b8ef1fed009 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
36 syn match gitoliteRepoError "[^ \t0-9a-zA-Z._@+/\\^$|()[\]*?{},-]\+" contained
3153
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 syn match gitoliteUserError "[^ \t0-9a-zA-Z._@+-]\+" contained
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 syn match gitoliteSpaceError "\s\+" contained
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 " Permission
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 syn match gitoliteKeyword "^\s*\(C\|R\|RW\|RW+\|RWC\|RW+C\|RWD\|RW+D\|RWCD\|RW+CD\)[ \t=]\@=" nextgroup=gitoliteRefex
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 syn match gitoliteKeyword "^\s*-[ \t=]\@=" nextgroup=gitoliteDenyRefex
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 syn match gitoliteRefex "[^=]*="he=e-1 contained contains=gitoliteSpecialRefex,gitoliteGroup nextgroup=gitoliteUserLine
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 syn match gitoliteDenyRefex "[^=]*="he=e-1 contained contains=gitoliteSpecialRefex,gitoliteGroup nextgroup=gitoliteDenyUsers
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 syn match gitoliteSpecialRefex "\sNAME/"he=e-1 contained
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 syn match gitoliteSpecialRefex "/USER/"hs=s+1,he=e-1 contained
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 syn match gitoliteDenyUsers ".*" contained contains=gitoliteUserError,gitoliteComment
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 " Configuration
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 syn match gitoliteKeyword "^\s*config\s\+" nextgroup=gitoliteConfVariable
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 syn match gitoliteConfVariable "[^=]*" contained
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 " Include
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 syn match gitoliteInclude "^\s*\(include\|subconf\)\s"
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 " String
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 syn region gitoliteString start=+"+ end=+"+ oneline
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 " Define the default highlighting
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 hi def link gitoliteComment Comment
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 hi def link gitoliteTodo Todo
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 hi def link gitoliteGroupDef gitoliteGroup
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 hi def link gitoliteGroup Identifier
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 hi def link gitoliteWildRepo Special
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 hi def link gitoliteRepoError gitoliteError
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 hi def link gitoliteUserError gitoliteError
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 hi def link gitoliteSpaceError gitoliteError
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 hi def link gitoliteError Error
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 hi def link gitoliteCreator gitolitePreProc
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 hi def link gitolitePreProc PreProc
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
71 hi def link gitoliteExtCmdHelper PreProc
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
72 hi def link gitoliteExtCmd Special
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 hi def link gitoliteRepoDef Type
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74 hi def link gitoliteKeyword Keyword
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
75 hi def link gitoliteRefex String
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76 hi def link gitoliteDenyRefex gitoliteRefex
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77 hi def link gitoliteSpecialRefex PreProc
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78 hi def link gitoliteDenyUsers WarningMsg
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 hi def link gitoliteConfVariable Identifier
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
80 hi def link gitoliteInclude Include
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81 hi def link gitoliteString String
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 let b:current_syntax = "gitolite"
3237
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3224
diff changeset
84
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3224
diff changeset
85 let &cpo = s:cpo_save
91e53bcb7946 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3224
diff changeset
86 unlet s:cpo_save