]> git.pld-linux.org Git - packages/vim.git/commitdiff
- files and attr improvements
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 13 Mar 2008 20:01:53 +0000 (20:01 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    spec.vim -> 1.76

spec.vim

index e5e86249624e20c23bda971b074de658683f2fd9..d2a8dd0ed1ad718980e60fa9e3b15ced4e988433 100644 (file)
--- a/spec.vim
+++ b/spec.vim
@@ -136,13 +136,15 @@ syn region specSectionMacroBcondArea oneline matchgroup=specBlock start='%{!\??\
 " %% Files Section %%
 " TODO %config valid parameters: missingok\|noreplace
 " TODO %verify valid parameters: \(not\)\= \(md5\|atime\|...\)
-syn region specFilesArea matchgroup=specSection start='^%[Ff][Ii][Ll][Ee][Ss]\>'
-       \ skip='%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\|exclude\|dev\|if\|else\|endif\)\>'
+syn region specFilesArea matchgroup=specSection start="^%files\>"
+       \ skip="%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\|exclude\|dev\|if\|ifarch\|ifnarch\|else\|endif\)\>"
        \ end='^%[a-zA-Z]'me=e-2
        \ contains=specFilesOpts,specFilesDirective,@specListedFiles,specComment,specCommandSpecial,specMacroIdentifier,specSectionMacroBcondArea,specIf
 
 " tip: remember to include new items in specFilesArea above
-syn match  specFilesDirective contained '%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\|exclude\|dev\)\>'
+syn match  specFilesDirective contained '%\(dir\|docdir\|doc\|ghost\|exclude\)\>'
+syn region specFilesDirective contained start="%\(attrib\|attr\|defattr\|config\|lang\|verify\|dev\)(" end=")" contains=specAttr transparent
+syn match  specAttr contained "%\(attrib\|attr\|defattr\|config\|lang\|verify\|dev\)"
 
 " valid options for certain section headers
 syn match specDescriptionOpts contained '\s-[ln]\s*\a'ms=s+1,me=e-1
@@ -221,12 +223,12 @@ syn sync match shCaseEsacSync groupthere shCaseEsac "\<esac\>"
 syn region specIf  matchgroup=specBlock start="%ifosf\|%ifos\|%ifnos\|%ifarch\|%ifnarch\|ifdef\|ifndef\|%if\|%else"  end='%endif' contains=ALLBUT, specOutSkip, specOut2
 
 " %if 0 handing
-syn region specOut start="^\s*%if\s\+0\+\>" end="$" contains=specOut2
+syn region specOut start="^\s*%if\s\+0$" end="$" contains=specOut2
 syn region specOut2 contained start="\<0" end="^\s*%\(endif\>\|else\>\)" contains=specOutSkip
 
 syn region specOutSkip contained start="^\s*%if\>" end="^\s*%endif\>" contains=specOutSkip
 
-syn sync match specIfSync     grouphere  specIf     "%if\|%ifarch\|%ifos\|%ifnos"
+syn sync match specIfSync     grouphere  specIf     "%ifarch\|%ifos\|%ifnos"
 syn sync match specIfSync     groupthere specIf     "%endIf"
 
 " Define the default highlighting.
@@ -275,6 +277,7 @@ if version >= 508 || !exists("did_spec_syntax_inits")
   HiLink specEmail                     specWWWlink
   HiLink specError                     Error
   HiLink specFilesDirective            specSectionMacro
+  HiLink specAttr                      specSectionMacro
   HiLink specFilesOpts                 specOpts
   HiLink specLicense                   String
   HiLink specLicenseWarning            specError
This page took 0.158648 seconds and 4 git commands to generate.