Mercurial > vim
annotate runtime/syntax/hb.vim @ 36533:90545c76016e draft default tip
runtime(tar): Update tar.vim to support permissions
Commit: https://github.com/vim/vim/commit/129a8446d23cd9cb4445fcfea259cba5e0487d29
Author: Lennart00 <73488709+Lennart00@users.noreply.github.com>
Date: Mon Nov 11 22:39:30 2024 +0100
runtime(tar): Update tar.vim to support permissions
These changes enable tar.vim to keep permissions of files that were
edited intact instead of replacing them with the default permissions.
The major change for this is switching from "tar -OPxf", which reads out
the contents of the selected file from an tar archive to stdout to
"tar -pPxf" which extracts the selected file to the current directory
with permissions intact
This requirs the temporary directory to be created earlier.
closes: #7379
Signed-off-by: Lennart00 <73488709+Lennart00@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 11 Nov 2024 22:45:02 +0100 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Hyper Builder | |
3 " Maintainer: Alejandro Forero Cuervo | |
4 " URL: http://bachue.com/hb/vim/syntax/hb.vim | |
3256 | 5 " Last Change: 2012 Jan 08 by Thilo Six |
7 | 6 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3256
diff
changeset
|
7 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3256
diff
changeset
|
8 if exists("b:current_syntax") |
7 | 9 finish |
10 endif | |
11 | |
3256 | 12 let s:cpo_save = &cpo |
13 set cpo&vim | |
14 | |
7 | 15 " Read the HTML syntax to start with |
16 "syn include @HTMLStuff <sfile>:p:h/htmlhb.vim | |
17 | |
18 "this would be nice but we are supposed not to do it | |
19 "set mps=<:> | |
20 | |
21 "syn region HBhtmlString contained start=+"+ end=+"+ contains=htmlSpecialChar | |
22 "syn region HBhtmlString contained start=+'+ end=+'+ contains=htmlSpecialChar | |
23 | |
24 "syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*" | |
25 | |
26 syn match htmlSpecialChar "&[^;]*;" contained | |
27 | |
28 syn match HBhtmlTagSk contained "[A-Za-z]*" | |
29 | |
30 syn match HBhtmlTagS contained "<\s*\(hb\s*\.\s*\(sec\|min\|hour\|day\|mon\|year\|input\|html\|time\|getcookie\|streql\|url-enc\)\|wall\s*\.\s*\(show\|info\|id\|new\|rm\|count\)\|auth\s*\.\s*\(chk\|add\|find\|user\)\|math\s*\.\s*exp\)\s*\([^.A-Za-z0-9]\|$\)" contains=HBhtmlTagSk transparent | |
31 | |
32 syn match HBhtmlTagN contained "[A-Za-z0-9\/\-]\+" | |
33 | |
34 syn match HBhtmlTagB contained "<\s*[A-Za-z0-9\/\-]\+\(\s*\.\s*[A-Za-z0-9\/\-]\+\)*" contains=HBhtmlTagS,HBhtmlTagN | |
35 | |
36 syn region HBhtmlTag contained start=+<+ end=+>+ contains=HBhtmlTagB,HBDirectiveError | |
37 | |
38 syn match HBFileName ".*" contained | |
39 | |
40 syn match HBDirectiveKeyword ":\s*\(include\|lib\|set\|out\)\s\+" contained | |
41 | |
42 syn match HBDirectiveError "^:.*$" contained | |
43 | |
44 "syn match HBDirectiveBlockEnd "^:\s*$" contained | |
45 | |
46 "syn match HBDirectiveOutHead "^:\s*out\s\+\S\+.*" contained contains=HBDirectiveKeyword,HBFileName | |
47 | |
48 "syn match HBDirectiveSetHead "^:\s*set\s\+\S\+.*" contained contains=HBDirectiveKeyword,HBFileName | |
49 | |
50 syn match HBInvalidLine "^.*$" | |
51 | |
52 syn match HBDirectiveInclude "^:\s*include\s\+\S\+.*$" contains=HBFileName,HBDirectiveKeyword | |
53 | |
54 syn match HBDirectiveLib "^:\s*lib\s\+\S\+.*$" contains=HBFileName,HBDirectiveKeyword | |
55 | |
56 syn region HBText matchgroup=HBDirectiveKeyword start=/^:\(set\|out\)\s*\S\+.*$/ end=/^:\s*$/ contains=HBDirectiveError,htmlSpecialChar,HBhtmlTag keepend | |
57 | |
58 "syn match HBLine "^:.*$" contains=HBDirectiveInclude,HBDirectiveLib,HBDirectiveError,HBDirectiveSet,HBDirectiveOut | |
59 | |
60 syn match HBComment "^#.*$" | |
61 | |
62 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3256
diff
changeset
|
63 " Only when an item doesn't have highlighting yet |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3256
diff
changeset
|
64 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
65 hi def link HBhtmlString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
66 hi def link HBhtmlTagN Function |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
67 hi def link htmlSpecialChar String |
7 | 68 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
69 hi def link HBInvalidLine Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
70 hi def link HBFoobar Comment |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3256
diff
changeset
|
71 hi HBFileName guibg=lightgray guifg=black |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
72 hi def link HBDirectiveError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
73 hi def link HBDirectiveBlockEnd HBDirectiveKeyword |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3256
diff
changeset
|
74 hi HBDirectiveKeyword guibg=lightgray guifg=darkgreen |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
75 hi def link HBComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
76 hi def link HBhtmlTagSk Statement |
7 | 77 |
78 | |
79 syn sync match Normal grouphere NONE "^:\s*$" | |
80 syn sync match Normal grouphere NONE "^:\s*lib\s\+[^ \t]\+$" | |
81 syn sync match Normal grouphere NONE "^:\s*include\s\+[^ \t]\+$" | |
82 "syn sync match Block grouphere HBDirectiveSet "^#:\s*set\s\+[^ \t]\+" | |
83 "syn sync match Block grouphere HBDirectiveOut "^#:\s*out\s\+[^ \t]\+" | |
84 | |
85 let b:current_syntax = "hb" | |
86 | |
3256 | 87 let &cpo = s:cpo_save |
88 unlet s:cpo_save | |
7 | 89 " vim: ts=8 |