Mercurial > vim
annotate runtime/syntax/gitolite.vim @ 34538:c865c2f93a04 v9.1.0171
patch 9.1.0171: Small split-move related improvements
Commit: https://github.com/vim/vim/commit/5cac1a9bee0798d70a7fd80363a1f697759638e8
Author: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Date: Tue Mar 12 21:11:39 2024 +0100
patch 9.1.0171: Small split-move related improvements
Problem: small improvements can be made to split-move related
functions.
Solution: apply them (Sean Dewar):
- Improve some doc comments (frame_flatten should still work for non-current
tabpages, despite the topframe check, which looks benign, though I'm unsure if
it's still needed; see #2467).
- f_win_splitmove should check_split_disallowed on wp, not targetwin, as that's
what win_splitmove checks (though it's probably unnecessary to check
b_locked_split at all; see #14109, which I hope to get around to finishing at
some point).
- Make winframe_restore restore window positions for the altframe, which
winframe_remove changes. This doesn't affect the prior behaviour, as we called
win_comp_pos after, but as win_comp_pos only works for curtab, and
winframe_remove supports non-current tabpages, we should undo it. Regardless,
this should mean we don't need win_comp_pos anymore; adjust tests to check
that window positions remain unchanged.
I'm not sure win_comp_pos is needed after last_status anyway if it doesn't
steal rows from another frame to make room for a new statusline, which
shouldn't be the case after winframe_remove? To be safe, I'll leave it as is.
closes: #14185
Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 12 Mar 2024 21:15:03 +0100 |
parents | 3b26420fc639 |
children |
rev | line source |
---|---|
3153 | 1 " Vim syntax file |
2 " Language: gitolite configuration | |
12756
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
3 " URL: https://github.com/sitaramc/gitolite/blob/master/contrib/vim/syntax/gitolite.vim |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
4 " (https://raw.githubusercontent.com/sitaramc/gitolite/master/contrib/vim/syntax/gitolite.vim) |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
5 " Maintainer: Sitaram Chamarty <sitaramc@gmail.com> |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
6 " (former Maintainer: Teemu Matilainen <teemu.matilainen@iki.fi>) |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
7 " Last Change: 2017 Oct 05 |
3153 | 8 |
9 if exists("b:current_syntax") | |
10 finish | |
11 endif | |
12 | |
3237 | 13 let s:cpo_save = &cpo |
14 set cpo&vim | |
15 | |
12756
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
16 " this seems to be the best way, for now. |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
17 syntax sync fromstart |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
18 |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
19 " ---- common stuff |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
20 |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
21 syn match gitoliteGroup '@\S\+' |
3153 | 22 |
12756
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
23 syn match gitoliteComment '#.*' contains=gitoliteTodo |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
24 syn keyword gitoliteTodo TODO FIXME XXX NOT contained |
3153 | 25 |
12756
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
26 " ---- main section |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
27 |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
28 " catch template-data syntax appearing outside template-data section |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
29 syn match gitoliteRepoError '^\s*repo.*=' |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
30 syn match gitoliteRepoError '^\s*\S\+\s*=' " this gets overridden later when first word is a perm, don't worry |
3153 | 31 |
12756
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
32 " normal gitolite group and repo lines |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
33 syn match gitoliteGroupLine '^\s*@\S\+\s*=\s*\S.*$' contains=gitoliteGroup,gitoliteComment |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
34 syn match gitoliteRepoLine '^\s*repo\s\+[^=]*$' contains=gitoliteRepo,gitoliteGroup,gitoliteComment |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
35 syn keyword gitoliteRepo repo contained |
3153 | 36 |
12756
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
37 syn keyword gitoliteSpecialRepo CREATOR |
3153 | 38 |
12756
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
39 " normal gitolite rule lines |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
40 syn match gitoliteRuleLine '^\s*\(-\|C\|R\|RW+\?C\?D\?\)\s[^#]*' contains=gitoliteRule,gitoliteCreateRule,gitoliteDenyRule,gitoliteRefex,gitoliteUsers,gitoliteGroup |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
41 syn match gitoliteRule '\(^\s*\)\@<=\(-\|C\|R\|RW+\?C\?D\?\)\s\@=' contained |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
42 syn match gitoliteRefex '\(^\s*\(-\|R\|RW+\?C\?D\?\)\s\+\)\@<=\S.\{-}\(\s*=\)\@=' contains=gitoliteSpecialRefex |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
43 syn match gitoliteSpecialRefex 'NAME/' |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
44 syn match gitoliteSpecialRefex '/USER/' |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
45 syn match gitoliteCreateRule '\(^\s*C\s.*=\s*\)\@<=\S[^#]*[^# ]' contained contains=gitoliteGroup |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
46 syn match gitoliteDenyRule '\(^\s*-\s.*=\s*\)\@<=\S[^#]*[^# ]' contained |
3153 | 47 |
12756
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
48 " normal gitolite config (and similar) lines |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
49 syn match gitoliteConfigLine '^\s*\(config\|option\|include\|subconf\)\s[^#]*' contains=gitoliteConfigKW,gitoliteConfigKey,gitoliteConfigVal,gitoliteComment |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
50 syn keyword gitoliteConfigKW config option include subconf contained |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
51 syn match gitoliteConfigKey '\(\(config\|option\)\s\+\)\@<=[^ =]*' contained |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
52 syn match gitoliteConfigVal '\(=\s*\)\@<=\S.*' contained |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
53 |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
54 " ---- template-data section |
3153 | 55 |
12756
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
56 syn region gitoliteTemplateLine matchgroup=PreProc start='^=begin template-data$' end='^=end$' contains=gitoliteTplRepoLine,gitoliteTplRoleLine,gitoliteGroup,gitoliteComment,gitoliteTplError |
3153 | 57 |
12756
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
58 syn match gitoliteTplRepoLine '^\s*repo\s\+\S.*=.*' contained contains=gitoliteTplRepo,gitoliteTplTemplates,gitoliteGroup |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
59 syn keyword gitoliteTplRepo repo contained |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
60 syn match gitoliteTplTemplates '\(=\s*\)\@<=\S.*' contained contains=gitoliteGroup,gitoliteComment |
3153 | 61 |
12756
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
62 syn match gitoliteTplRoleLine '^\s*\S\+\s*=\s*.*' contained contains=gitoliteTplRole,gitoliteGroup,gitoliteComment |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
63 syn match gitoliteTplRole '\S\+\s*='he=e-1 contained |
3153 | 64 |
12756
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
65 " catch normal gitolite rules appearing in template-data section |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
66 syn match gitoliteTplError '^\s*repo[^=]*$' contained |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
67 syn match gitoliteTplError '^\s*\(-\|R\|RW+\?C\?D\?\)\s'he=e-1 contained |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
68 syn match gitoliteTplError '^\s*\(config\|option\|include\|subconf\)\s'he=e-1 contained |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
69 syn match gitoliteTplError '^\s*@\S\+\s*=' contained contains=NONE |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
70 |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
71 hi def link gitoliteGroup Identifier |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
72 hi def link gitoliteComment Comment |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
73 hi def link gitoliteTodo ToDo |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
74 hi def link gitoliteRepoError Error |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
75 hi def link gitoliteGroupLine PreProc |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
76 hi def link gitoliteRepo Keyword |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
77 hi def link gitoliteSpecialRepo PreProc |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
78 hi def link gitoliteRule Keyword |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
79 hi def link gitoliteCreateRule PreProc |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
80 hi def link gitoliteDenyRule WarningMsg |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
81 hi def link gitoliteRefex Constant |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
82 hi def link gitoliteSpecialRefex PreProc |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
83 hi def link gitoliteConfigKW Keyword |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
84 hi def link gitoliteConfigKey Identifier |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
85 hi def link gitoliteConfigVal String |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
86 hi def link gitoliteTplRepo Keyword |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
87 hi def link gitoliteTplTemplates Constant |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
88 hi def link gitoliteTplRole Constant |
3b26420fc639
Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
89 hi def link gitoliteTplError Error |
3153 | 90 |
91 let b:current_syntax = "gitolite" | |
3237 | 92 |
93 let &cpo = s:cpo_save | |
94 unlet s:cpo_save |