From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3220B138335 for ; Tue, 21 Aug 2018 08:02:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2026AE082F; Tue, 21 Aug 2018 08:02:45 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CF4C2E082F for ; Tue, 21 Aug 2018 08:02:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3A917335D55 for ; Tue, 21 Aug 2018 08:02:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 585CE3A7 for ; Tue, 21 Aug 2018 08:02:41 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1534835451.4451cbdf4026a828232ba87b73f69feed54b41ab.mgorny@gentoo> Subject: [gentoo-commits] proj/gentoo-syntax:master commit in: syntax/ X-VCS-Repository: proj/gentoo-syntax X-VCS-Files: syntax/gentoo-mirrors.vim syntax/gentoo-package-common.vim syntax/gentoo-package-keywords.vim syntax/gentoo-package-license.vim syntax/gentoo-package-mask.vim syntax/gentoo-package-properties.vim syntax/gentoo-package-use.vim syntax/gentoo-use-desc.vim X-VCS-Directories: syntax/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 4451cbdf4026a828232ba87b73f69feed54b41ab X-VCS-Branch: master Date: Tue, 21 Aug 2018 08:02:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 5acee166-b063-4c43-99d7-071143123b1c X-Archives-Hash: 9a55599ceb564f8c4773614a40879730 commit: 4451cbdf4026a828232ba87b73f69feed54b41ab Author: Michał Górny gentoo org> AuthorDate: Tue Aug 21 07:10:51 2018 +0000 Commit: Michał Górny gentoo org> CommitDate: Tue Aug 21 07:10:51 2018 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=4451cbdf syntax: Move package.*/etc. common rules to common file syntax/gentoo-mirrors.vim | 11 +---------- syntax/gentoo-package-common.vim | 21 +++++++++++++++++++++ syntax/gentoo-package-keywords.vim | 11 +---------- syntax/gentoo-package-license.vim | 11 +---------- syntax/gentoo-package-mask.vim | 12 +----------- syntax/gentoo-package-properties.vim | 11 +---------- syntax/gentoo-package-use.vim | 13 +------------ syntax/gentoo-use-desc.vim | 6 +----- 8 files changed, 28 insertions(+), 68 deletions(-) diff --git a/syntax/gentoo-mirrors.vim b/syntax/gentoo-mirrors.vim index d5b09f6..686465b 100644 --- a/syntax/gentoo-mirrors.vim +++ b/syntax/gentoo-mirrors.vim @@ -16,22 +16,13 @@ if exists("b:current_syntax") finish endif -runtime syntax/gentoo-common.vim - -syn region GentooMirrorsComment start=/#/ end=/$/ - \ contains=GentooMirrorsEmail,GentooMirrorsDate,GentooBug - -syn match GentooMirrorsEmail contained /<[a-zA-Z0-9\-\_]\+@[a-zA-Z0-9\-\_\.]\+>/ -syn match GentooMirrorsDate contained /(\(\d\d\?\s\w\+\|\w\+\s\d\d\?\)\s\d\{4\})/ +runtime syntax/gentoo-package-common.vim syn match GentooMirrorsAtom /^[^# \t]\+/ \ nextgroup=GentooMirrorsUrl skipwhite syn region GentooMirrorsUrl contained start=/\(http\|ftp\):\/\// end=/\(\s\)\@=\|$/ \ nextgroup=GentooMirrorsUrl skipwhite -hi def link GentooMirrorsComment Comment -hi def link GentooMirrorsEmail Special -hi def link GentooMirrorsDate Number hi def link GentooMirrorsAtom Identifier hi def link GentooMirrorsUrl String diff --git a/syntax/gentoo-package-common.vim b/syntax/gentoo-package-common.vim new file mode 100644 index 0000000..1e8091e --- /dev/null +++ b/syntax/gentoo-package-common.vim @@ -0,0 +1,21 @@ +" Vim syntax file +" Language: Gentoo package.*/use.desc/etc. common rules +" Author: Michał Górny +" Copyright: Copyright (c) 2018 Michał Górny +" Licence: You may redistribute this under the same terms as Vim itself + +if &compatible || v:version < 603 + finish +endif + +runtime syntax/gentoo-common.vim + +syn region GentooPackageComment start=/#/ end=/$/ + \ contains=GentooPackageEmail,GentooPackageDate,GentooBug + +syn match GentooPackageEmail contained /<[a-zA-Z0-9\-\_]\+@[a-zA-Z0-9\-\_\.]\+>/ +syn match GentooPackageDate contained /(\(\d\d\?\s\w\+\|\w\+\s\d\d\?\)\s\d\{4\})/ + +hi def link GentooPackageComment Comment +hi def link GentooPackageEmail Special +hi def link GentooPackageDate Number diff --git a/syntax/gentoo-package-keywords.vim b/syntax/gentoo-package-keywords.vim index 190954f..4315d91 100644 --- a/syntax/gentoo-package-keywords.vim +++ b/syntax/gentoo-package-keywords.vim @@ -16,22 +16,13 @@ if exists("b:current_syntax") finish endif -runtime syntax/gentoo-common.vim - -syn region GentooPackageKeywordsComment start=/#/ end=/$/ - \ contains=GentooPackageKeywordsEmail,GentooPackageKeywordsDate,GentooBug - -syn match GentooPackageKeywordsEmail contained /<[a-zA-Z0-9\-\_]\+@[a-zA-Z0-9\-\_\.]\+>/ -syn match GentooPackageKeywordsDate contained /(\(\d\d\?\s\w\+\|\w\+\s\d\d\?\)\s\d\{4\})/ +runtime syntax/gentoo-package-common.vim syn match GentooPackageKeywordsAtom /^[\ \t]*[^ \t\n#]\+\S\+\/\S\+/ \ nextgroup=GentooPackageKeywordsKeyword skipwhite syn match GentooPackageKeywordsKeyword contained /-\?[-~]\?\([a-z0-9\-]\+\|\*\)/ \ nextgroup=GentooPackageKeywordsKeyword skipwhite -hi def link GentooPackageKeywordsComment Comment -hi def link GentooPackageKeywordsEmail Special -hi def link GentooPackageKeywordsDate Number hi def link GentooPackageKeywordsAtom Identifier hi def link GentooPackageKeywordsKeyword Keyword diff --git a/syntax/gentoo-package-license.vim b/syntax/gentoo-package-license.vim index 824d70a..8764a66 100644 --- a/syntax/gentoo-package-license.vim +++ b/syntax/gentoo-package-license.vim @@ -16,22 +16,13 @@ if exists("b:current_syntax") finish endif -runtime syntax/gentoo-common.vim - -syn region GentooPackageLicenseComment start=/#/ end=/$/ - \ contains=GentooPackageLicenseEmail,GentooPackageLicenseDate,GentooBug - -syn match GentooPackageLicenseEmail contained /<[a-zA-Z0-9\-\_]\+@[a-zA-Z0-9\-\_\.]\+>/ -syn match GentooPackageLicenseDate contained /(\(\d\d\?\s\w\+\|\w\+\s\d\d\?\)\s\d\{4\})/ +runtime syntax/gentoo-package-common.vim syn match GentooPackageLicenseAtom /^[^ \t\n#]\+\S\+\/\S\+/ \ nextgroup=GentooPackageLicenseLicense skipwhite syn match GentooPackageLicenseLicense contained /-\?@\?\([a-zA-Z0-9\-_.+]\+\|\*\)/ \ nextgroup=GentooPackageLicenseLicense skipwhite -hi def link GentooPackageLicenseComment Comment -hi def link GentooPackageLicenseEmail Special -hi def link GentooPackageLicenseDate Number hi def link GentooPackageLicenseAtom Identifier hi def link GentooPackageLicenseLicense Keyword diff --git a/syntax/gentoo-package-mask.vim b/syntax/gentoo-package-mask.vim index c36b45d..d08ec0e 100644 --- a/syntax/gentoo-package-mask.vim +++ b/syntax/gentoo-package-mask.vim @@ -16,20 +16,10 @@ if exists("b:current_syntax") finish endif -runtime syntax/gentoo-common.vim - -" Header -syn region GentooPackageMaskComment start=/#/ end=/$/ - \ contains=GentooPackageMaskEmail,GentooPackageMaskDate,GentooBug - -syn match GentooPackageMaskEmail contained /<[a-zA-Z0-9\-\_]\+@[a-zA-Z0-9\-\_\.]\+>/ -syn match GentooPackageMaskDate contained /(\(\d\d\?\s\w\+\|\w\+\s\d\d\?\)\s\d\{4\})/ +runtime syntax/gentoo-package-common.vim syn match GentooPackageMaskAtom /^[^ \t\n#]\+\S\+\/\S\+/ -hi def link GentooPackageMaskComment Comment -hi def link GentooPackageMaskEmail Special -hi def link GentooPackageMaskDate Number hi def link GentooPackageMaskAtom Identifier let b:current_syntax = "gentoo-package-mask" diff --git a/syntax/gentoo-package-properties.vim b/syntax/gentoo-package-properties.vim index 8609491..faf15ad 100644 --- a/syntax/gentoo-package-properties.vim +++ b/syntax/gentoo-package-properties.vim @@ -16,22 +16,13 @@ if exists("b:current_syntax") finish endif -runtime syntax/gentoo-common.vim - -syn region GentooPackagePropertiesComment start=/#/ end=/$/ - \ contains=GentooPackagePropertiesEmail,GentooPackagePropertiesDate,GentooBug - -syn match GentooPackagePropertiesEmail contained /<[a-zA-Z0-9\-\_]\+@[a-zA-Z0-9\-\_\.]\+>/ -syn match GentooPackagePropertiesDate contained /(\(\d\d\?\s\w\+\|\w\+\s\d\d\?\)\s\d\{4\})/ +runtime syntax/gentoo-package-common.vim syn match GentooPackagePropertiesAtom /^[^ \t\n#]\+\S\+\/\S\+/ \ nextgroup=GentooPackagePropertiesProperty skipwhite syn match GentooPackagePropertiesProperty contained /-\?\([a-zA-Z0-9\-_]\+\|\*\)/ \ nextgroup=GentooPackagePropertiesProperty skipwhite -hi def link GentooPackagePropertiesComment Comment -hi def link GentooPackagePropertiesEmail Special -hi def link GentooPackagePropertiesDate Number hi def link GentooPackagePropertiesAtom Identifier hi def link GentooPackagePropertiesProperty Keyword diff --git a/syntax/gentoo-package-use.vim b/syntax/gentoo-package-use.vim index d4eda18..7136467 100644 --- a/syntax/gentoo-package-use.vim +++ b/syntax/gentoo-package-use.vim @@ -16,15 +16,7 @@ if exists("b:current_syntax") finish endif -runtime syntax/gentoo-common.vim - -syn region GentooPackageUseComment start=/#/ end=/$/ - \ contains=GentooPackageUseEmail,GentooPackageUseDate,GentooBug - -syn match GentooPackageUseEmail contained - \ /<[a-zA-Z0-9\-\_]\+@[a-zA-Z0-9\-\_\.]\+>/ -syn match GentooPackageUseDate contained - \ /(\(\d\d\?\s\w\+\|\w\+\s\d\d\?\)\s\d\{4\})/ +runtime syntax/gentoo-package-common.vim syn match GentooPackageUseAtom /^[^ \t\n#]\+\S\+\/\S\+/ \ nextgroup=GentooPackageUseUse,GentooPackageUseUnuse, @@ -42,9 +34,6 @@ syn match GentooPackageUseExpand contained \ nextgroup=GentooPackageUseUse,GentooPackageUseUnuse \ skipwhite -hi def link GentooPackageUseComment Comment -hi def link GentooPackageUseEmail Special -hi def link GentooPackageUseDate Number hi def link GentooPackageUseAtom Identifier hi def link GentooPackageUseUse Special hi def link GentooPackageUseUnuse Keyword diff --git a/syntax/gentoo-use-desc.vim b/syntax/gentoo-use-desc.vim index ec4a48b..e2c4041 100644 --- a/syntax/gentoo-use-desc.vim +++ b/syntax/gentoo-use-desc.vim @@ -16,10 +16,7 @@ if exists("b:current_syntax") finish endif -runtime syntax/gentoo-common.vim - -syn region GentooUseDescComment start=/#/ end=/$/ - \ contains=GentooBug +runtime syntax/gentoo-package-common.vim syn match GentooUseDescPackage /^\(#\)\@!\([a-zA-Z0-9\-\_+\.]\+\/[a-zA-Z0-9\-\_+]\+\)\?/ nextgroup=GentooUseDescColon,GentooUseDescFlag skipwhite syn match GentooUseDescColon /:/ contained nextgroup=GentooUseDescFlag @@ -27,7 +24,6 @@ syn match GentooUseDescFlag contained /[a-zA-Z0-9\-\_+@:]\+/ nextgroup=GentooUse syn match GentooUseDescDash /-\s*/ contained nextgroup=GentooUseDescDesc skipwhite syn region GentooUseDescDesc start=// end=/$/ contained skipwhite -hi def link GentooUseDescComment Comment hi def link GentooUseDescPackage Keyword hi def link GentooUseDescFlag Identifier hi def link GentooUseDescDesc String