annotate runtime/syntax/dep3patch.vim @ 28835:58d2315b096e v8.2.4941

patch 8.2.4941: '[ and '] marks may be wrong after undo Commit: https://github.com/vim/vim/commit/82444cefa3fef87624a078ea86a72af7ef4ef42e Author: LemonBoy <thatlemon@gmail.com> Date: Thu May 12 15:39:31 2022 +0100 patch 8.2.4941: '[ and '] marks may be wrong after undo Problem: '[ and '] marks may be wrong after undo. Solution: Adjust the '[ and '] marks if needed. (closes https://github.com/vim/vim/issues/10407, closes https://github.com/vim/vim/issues/1281)
author Bram Moolenaar <Bram@vim.org>
date Thu, 12 May 2022 16:45:03 +0200
parents 6dd88e45d47d
children cc751d944b7e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26708
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: Debian DEP3 Patch headers
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainer: Gabriel Filion <gabster@lelutin.ca>
28379
6dd88e45d47d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26708
diff changeset
4 " Last Change: 2022 Apr 06
26708
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 " URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/dep3patch.vim
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 "
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 " Specification of the DEP3 patch header format is available at:
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 " https://dep-team.pages.debian.net/deps/dep3/
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 " Standard syntax initialization
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 if exists('b:current_syntax')
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 finish
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 endif
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 runtime! syntax/diff.vim
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 unlet! b:current_syntax
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 let s:cpo_save = &cpo
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 set cpo&vim
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 syn region dep3patchHeaders start="\%^" end="^\%(---\)\@=" contains=dep3patchKey,dep3patchMultiField
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 syn case ignore
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 syn region dep3patchMultiField matchgroup=dep3patchKey start="^\%(Description\|Subject\)\ze: *" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contained contains=@Spell
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 syn region dep3patchMultiField matchgroup=dep3patchKey start="^Origin\ze: *" end="$" contained contains=dep3patchHTTPUrl,dep3patchCommitID,dep3patchOriginCategory oneline keepend
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 syn region dep3patchMultiField matchgroup=dep3patchKey start="^Bug\%(-[[:graph:]]\+\)\?\ze: *" end="$" contained contains=dep3patchHTTPUrl oneline keepend
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 syn region dep3patchMultiField matchgroup=dep3patchKey start="^Forwarded\ze: *" end="$" contained contains=dep3patchHTTPUrl,dep3patchForwardedShort oneline keepend
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 syn region dep3patchMultiField matchgroup=dep3patchKey start="^\%(Author\|From\)\ze: *" end="$" contained contains=dep3patchEmail oneline keepend
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 syn region dep3patchMultiField matchgroup=dep3patchKey start="^\%(Reviewed-by\|Acked-by\)\ze: *" end="$" contained contains=dep3patchEmail oneline keepend
28379
6dd88e45d47d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26708
diff changeset
31 syn region dep3patchMultiField matchgroup=dep3patchKey start="^Last-Update\ze: *" end="$" contained contains=dep3patchISODate oneline keepend
26708
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 syn region dep3patchMultiField matchgroup=dep3patchKey start="^Applied-Upstream\ze: *" end="$" contained contains=dep3patchHTTPUrl,dep3patchCommitID oneline keepend
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 syn match dep3patchHTTPUrl contained "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$"
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 syn match dep3patchCommitID contained "commit:[[:alnum:]]\+"
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 syn match dep3patchOriginCategory contained "\%(upstream\|backport\|vendor\|other\), "
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 syn match dep3patchForwardedShort contained "\%(yes\|no\|not-needed\), "
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 syn match dep3patchEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+"
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 syn match dep3patchEmail "<.\{-}>"
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 syn match dep3patchISODate "[[:digit:]]\{4}-[[:digit:]]\{2}-[[:digit:]]\{2}"
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 " Associate our matches and regions with pretty colours
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 hi def link dep3patchKey Keyword
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 hi def link dep3patchOriginCategory Keyword
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 hi def link dep3patchForwardedShort Keyword
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 hi def link dep3patchMultiField Normal
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 hi def link dep3patchHTTPUrl Identifier
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 hi def link dep3patchCommitID Identifier
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 hi def link dep3patchEmail Identifier
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 hi def link dep3patchISODate Identifier
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 let b:current_syntax = 'dep3patch'
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 let &cpo = s:cpo_save
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 unlet s:cpo_save
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56
f0d7cb510ce3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 " vim: ts=8 sw=2