comparison runtime/syntax/aptconf.vim @ 7597:3012eaddb6b2

commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jan 15 20:57:49 2016 +0100 Update runtime files
author Christian Brabandt <cb@256bit.org>
date Fri, 15 Jan 2016 21:00:07 +0100
parents 22fa3049e934
children 43efa4f5a8ea
comparison
equal deleted inserted replaced
7596:a9234d9e3efd 7597:3012eaddb6b2
1 " Vim syntax file 1 " Vim syntax file
2 " Language: APT config file 2 " Language: APT config file
3 " Maintainer: Yann Amar <quidame@poivron.org> 3 " Maintainer: Yann Amar <quidame@poivron.org>
4 " Last Change: 2013 Apr 12 4 " Last Change: 2015 Dec 22
5 5
6 " For version 5.x: Clear all syntax items 6 " For version 5.x: Clear all syntax items
7 " For version 6.x and 7.x: Quit when a syntax file was already loaded 7 " For version 6.x and 7.x: Quit when a syntax file was already loaded
8 if !exists("main_syntax") 8 if !exists("main_syntax")
9 if version < 600 9 if version < 600
36 setlocal iskeyword+=/,-,.,_,+ 36 setlocal iskeyword+=/,-,.,_,+
37 "setlocal iskeyword+=: is problematic, because of the '::' separator 37 "setlocal iskeyword+=: is problematic, because of the '::' separator
38 38
39 " Incomplete keywords will be treated differently than completely bad strings: 39 " Incomplete keywords will be treated differently than completely bad strings:
40 syn keyword aptconfGroupIncomplete 40 syn keyword aptconfGroupIncomplete
41 \ a[cquire] a[ptitude] d[ebtags] d[ebug] d[ir] d[pkg] d[select] 41 \ a[cquire] a[dequate] a[ptitude] a[ptlistbugs] d[ebtags] d[ebug]
42 \ o[rderlist] p[ackagemanager] p[kgcachegen] q[uiet] r[pm] 42 \ d[ir] d[pkg] d[select] o[rderlist] p[ackagemanager] p[kgcachegen]
43 \ u[nattended-upgrade] 43 \ q[uiet] r[pm] s[ynaptic] u[nattended-upgrade] w[hatmaps]
44 44
45 " Only the following keywords can be used at toplevel (to begin an option): 45 " Only the following keywords can be used at toplevel (to begin an option):
46 syn keyword aptconfGroup 46 syn keyword aptconfGroup
47 \ acquire apt aptitude debtags debug dir dpkg dselect 47 \ acquire adequate apt aptitude aptlistbugs debtags debug
48 \ orderlist packagemanager pkgcachegen quiet rpm 48 \ dir dpkg dselect orderlist packagemanager pkgcachegen
49 \ unattended-upgrade 49 \ quiet rpm synaptic unattended-upgrade whatmaps
50 50
51 " Possible options for each group: 51 " Possible options for each group:
52 " Acquire: {{{ 52 " Acquire: {{{
53 syn keyword aptconfAcquire contained 53 syn keyword aptconfAcquire contained
54 \ cdrom Check-Valid-Until CompressionTypes ForceHash ftp gpgv 54 \ cdrom Check-Valid-Until CompressionTypes ForceHash ForceIPv4
55 \ GzipIndexes http https Languages Max-ValidTime Min-ValidTime PDiffs 55 \ ForceIPv6 ftp gpgv GzipIndexes http https Languages Max-ValidTime
56 \ Queue-Mode Retries Source-Symlinks 56 \ Min-ValidTime PDiffs Queue-Mode Retries Source-Symlinks
57 57
58 syn keyword aptconfAcquireCDROM contained 58 syn keyword aptconfAcquireCDROM contained
59 \ AutoDetect CdromOnly Mount UMount 59 \ AutoDetect CdromOnly Mount UMount
60 60
61 syn keyword aptconfAcquireCompressionTypes contained 61 syn keyword aptconfAcquireCompressionTypes contained
62 \ bz2 lzma gz Order 62 \ bz2 lzma gz Order
63 63
64 syn keyword aptconfAcquireFTP contained 64 syn keyword aptconfAcquireFTP contained
65 \ Passive Proxy ProxyLogin Timeout 65 \ ForceExtended Passive Proxy ProxyLogin Timeout
66 66
67 syn keyword aptconfAcquireHTTP contained 67 syn keyword aptconfAcquireHTTP contained
68 \ AllowRedirect Dl-Limit Max-Age No-Cache No-Store Pipeline-Depth 68 \ AllowRedirect Dl-Limit Max-Age No-Cache No-Store Pipeline-Depth
69 \ Proxy Timeout User-Agent 69 \ Proxy ProxyAutoDetect Proxy-Auto-Detect Timeout User-Agent
70 70
71 syn keyword aptconfAcquireHTTPS contained 71 syn keyword aptconfAcquireHTTPS contained
72 \ CaInfo CaPath CrlFile IssuerCert SslCert SslForceVersion SslKey 72 \ AllowRedirect CaInfo CaPath CrlFile Dl-Limit IssuerCert Max-Age
73 \ No-Cache No-Store Proxy SslCert SslForceVersion SslKey Timeout
73 \ Verify-Host Verify-Peer 74 \ Verify-Host Verify-Peer
74 75
75 syn keyword aptconfAcquireMaxValidTime contained 76 syn keyword aptconfAcquireMaxValidTime contained
76 \ Debian Debian-Security 77 \ Debian Debian-Security
77 78
81 syn cluster aptconfAcquire_ contains=aptconfAcquire, 82 syn cluster aptconfAcquire_ contains=aptconfAcquire,
82 \ aptconfAcquireCDROM,aptconfAcquireCompressionTypes,aptconfAcquireFTP, 83 \ aptconfAcquireCDROM,aptconfAcquireCompressionTypes,aptconfAcquireFTP,
83 \ aptconfAcquireHTTP,aptconfAcquireHTTPS,aptconfAcquireMaxValidTime, 84 \ aptconfAcquireHTTP,aptconfAcquireHTTPS,aptconfAcquireMaxValidTime,
84 \ aptconfAcquirePDiffs 85 \ aptconfAcquirePDiffs
85 " }}} 86 " }}}
87 " Adequate: {{{
88 syn keyword aptconfAdequate contained
89 \ Enabled
90
91 syn cluster aptconfAdequate_ contains=aptconfAdequate
92 " }}}
86 " Apt: {{{ 93 " Apt: {{{
87 syn keyword aptconfApt contained 94 syn keyword aptconfApt contained
88 \ Architecture Architectures Archive Authentication AutoRemove 95 \ Architecture Architectures Archive Authentication AutoRemove
89 \ Build-Essential Cache Cache-Grow Cache-Limit Cache-Start CDROM 96 \ Build-Essential Build-Profiles Cache Cache-Grow Cache-Limit
90 \ Changelogs Clean-Installed Compressor Default-Release 97 \ Cache-Start CDROM Changelogs Clean-Installed Compressor
91 \ Force-LoopBreak Get Ignore-Hold Immediate-Configure 98 \ Default-Release Force-LoopBreak Get Ignore-Hold Immediate-Configure
92 \ Install-Recommends Install-Suggests Keep-Fds List-Cleanup 99 \ Install-Recommends Install-Suggests Keep-Fds List-Cleanup
93 \ NeverAutoRemove Never-MarkAuto-Sections Periodic Status-Fd Update 100 \ Move-Autobit-Sections NeverAutoRemove Never-MarkAuto-Sections
101 \ Periodic Status-Fd Update VersionedKernelPackages
94 102
95 syn keyword aptconfAptAuthentication contained 103 syn keyword aptconfAptAuthentication contained
96 \ TrustCDROM 104 \ TrustCDROM
97 105
98 syn keyword aptconfAptAutoRemove contained 106 syn keyword aptconfAptAutoRemove contained
122 \ Show-Upgraded Show-User-Simulation-Note Show-Versions Simulate 130 \ Show-Upgraded Show-User-Simulation-Note Show-Versions Simulate
123 \ Tar-Only Trivial-Only Upgrade 131 \ Tar-Only Trivial-Only Upgrade
124 132
125 syn keyword aptconfAptPeriodic contained 133 syn keyword aptconfAptPeriodic contained
126 \ AutocleanInterval BackupArchiveInterval BackupLevel 134 \ AutocleanInterval BackupArchiveInterval BackupLevel
127 \ Download-Upgradeable-Packages MaxAge MaxSize MinAge 135 \ Download-Upgradeable-Packages Download-Upgradeable-Packages-Debdelta
128 \ Unattended-Upgrade Update-Package-Lists Verbose 136 \ Enable MaxAge MaxSize MinAge Unattended-Upgrade Update-Package-Lists
137 \ Verbose
129 138
130 syn keyword aptconfAptUpdate contained 139 syn keyword aptconfAptUpdate contained
131 \ Pre-Invoke Post-Invoke Post-Invoke-Success 140 \ List-Refresh Pre-Invoke Post-Invoke Post-Invoke-Success
132 141
133 syn cluster aptconfApt_ contains=aptconfApt, 142 syn cluster aptconfApt_ contains=aptconfApt,
134 \ aptconfAptAuthentication,aptconfAptAutoRemove,aptconfAptCache, 143 \ aptconfAptAuthentication,aptconfAptAutoRemove,aptconfAptCache,
135 \ aptconfAptCDROM,aptconfAptChangelogs,aptconfAptCompressor, 144 \ aptconfAptCDROM,aptconfAptChangelogs,aptconfAptCompressor,
136 \ aptconfAptCompressorAll,aptconfAptGet,aptconfAptPeriodic, 145 \ aptconfAptCompressorAll,aptconfAptGet,aptconfAptPeriodic,
238 \ aptconfAptitudeProblemResolver,aptconfAptitudeSafeResolver, 247 \ aptconfAptitudeProblemResolver,aptconfAptitudeSafeResolver,
239 \ aptconfAptitudeScreenshot,aptconfAptitudeSections,aptconfAptitudeUI, 248 \ aptconfAptitudeScreenshot,aptconfAptitudeSections,aptconfAptitudeUI,
240 \ aptconfAptitudeUIKeyBindings,aptconfAptitudeUIStyles, 249 \ aptconfAptitudeUIKeyBindings,aptconfAptitudeUIStyles,
241 \ aptconfAptitudeUIStylesElements 250 \ aptconfAptitudeUIStylesElements
242 " }}} 251 " }}}
252 " AptListbugs: {{{
253 syn keyword aptconfAptListbugs contained
254 \ IgnoreRegexp Severities
255
256 syn cluster aptconfAptListbugs_ contains=aptconfAptListbugs
257 " }}}
243 " DebTags: {{{ 258 " DebTags: {{{
244 syn keyword aptconfDebTags contained 259 syn keyword aptconfDebTags contained
245 \ Vocabulary 260 \ Vocabulary
246 261
247 syn cluster aptconfDebTags_ contains=aptconfDebTags 262 syn cluster aptconfDebTags_ contains=aptconfDebTags
249 " Debug: {{{ 264 " Debug: {{{
250 syn keyword aptconfDebug contained 265 syn keyword aptconfDebug contained
251 \ Acquire aptcdrom BuildDeps Hashes IdentCdrom Nolocking 266 \ Acquire aptcdrom BuildDeps Hashes IdentCdrom Nolocking
252 \ pkgAcquire pkgAutoRemove pkgCacheGen pkgDepCache pkgDPkgPM 267 \ pkgAcquire pkgAutoRemove pkgCacheGen pkgDepCache pkgDPkgPM
253 \ pkgDPkgProgressReporting pkgInitialize pkgOrderList 268 \ pkgDPkgProgressReporting pkgInitialize pkgOrderList
254 \ pkgPackageManager pkgPolicy pkgProblemResolver sourceList 269 \ pkgPackageManager pkgPolicy pkgProblemResolver RunScripts
270 \ sourceList
255 271
256 syn keyword aptconfDebugAcquire contained 272 syn keyword aptconfDebugAcquire contained
257 \ cdrom Ftp gpgv Http Https netrc 273 \ cdrom Ftp gpgv Http Https netrc
258 274
259 syn keyword aptconfDebugPkgAcquire contained 275 syn keyword aptconfDebugPkgAcquire contained
293 309
294 syn keyword aptconfDirMedia contained 310 syn keyword aptconfDirMedia contained
295 \ MountPath 311 \ MountPath
296 312
297 syn keyword aptconfDirState contained 313 syn keyword aptconfDirState contained
298 \ cdroms extended_states Lists mirrors status 314 \ cdroms extended_states Lists mirrors preferences status
299 315
300 syn cluster aptconfDir_ contains=aptconfDir, 316 syn cluster aptconfDir_ contains=aptconfDir,
301 \ aptconfDirAptitude,aptconfDirBin,aptconfDirCache,aptconfDirEtc, 317 \ aptconfDirAptitude,aptconfDirBin,aptconfDirCache,aptconfDirEtc,
302 \ aptconfDirLog,aptconfDirMedia,aptconfDirState 318 \ aptconfDirLog,aptconfDirMedia,aptconfDirState
303 " }}} 319 " }}}
304 " DPkg: {{{ 320 " DPkg: {{{
305 syn keyword aptconfDPkg contained 321 syn keyword aptconfDPkg contained
306 \ Build-Options Chroot-Directory ConfigurePending FlushSTDIN MaxArgs 322 \ Build-Options Chroot-Directory ConfigurePending FlushSTDIN
307 \ MaxBytes NoTriggers options Pre-Install-Pkgs Pre-Invoke Post-Invoke 323 \ MaxArgBytes MaxArgs MaxBytes NoTriggers options
324 \ Pre-Install-Pkgs Pre-Invoke Post-Invoke
308 \ Run-Directory StopOnError Tools TriggersPending 325 \ Run-Directory StopOnError Tools TriggersPending
309 326
310 syn keyword aptconfDPkgTools contained 327 syn keyword aptconfDPkgTools contained
311 \ Options Version 328 \ adequate InfoFD Options Version
312 329
313 syn cluster aptconfDPkg_ contains=aptconfDPkg, 330 syn cluster aptconfDPkg_ contains=aptconfDPkg,
314 \ aptconfDPkgOrderList,aptconfDPkgOrderListScore,aptconfDPkgTools 331 \ aptconfDPkgTools
315 " }}} 332 " }}}
316 " DSelect: {{{ 333 " DSelect: {{{
317 syn keyword aptconfDSelect contained 334 syn keyword aptconfDSelect contained
318 \ CheckDir Clean Options PromptAfterUpdate UpdateOptions 335 \ CheckDir Clean Options PromptAfterUpdate UpdateOptions
319 336
351 syn keyword aptconfRpm contained 368 syn keyword aptconfRpm contained
352 \ Post-Invoke Pre-Invoke 369 \ Post-Invoke Pre-Invoke
353 370
354 syn cluster aptconfRpm_ contains=aptconfRpm 371 syn cluster aptconfRpm_ contains=aptconfRpm
355 " }}} 372 " }}}
356 " Unattened Upgrade: {{{ 373 " Synaptic: {{{
374 syn keyword aptconfSynaptic contained
375 \ AskQuitOnProceed AskRelated AutoCleanCache CleanCache DefaultDistro
376 \ delAction delHistory Download-Only ftpProxy ftpProxyPort httpProxy
377 \ httpProxyPort Install-Recommends LastSearchType Maximized noProxy
378 \ OneClickOnStatusActions ShowAllPkgInfoInMain showWelcomeDialog
379 \ ToolbarState undoStackSize update upgradeType useProxy UseStatusColors
380 \ UseTerminal useUserFont useUserTerminalFont ViewMode
381 \ availVerColumnPos availVerColumnVisible componentColumnPos
382 \ componentColumnVisible descrColumnPos descrColumnVisible
383 \ downloadSizeColumnPos downloadSizeColumnVisible hpanedPos
384 \ instVerColumnPos instVerColumnVisible instSizeColumnPos
385 \ instSizeColumnVisible nameColumnPos nameColumnVisible
386 \ sectionColumnPos sectionColumnVisible statusColumnPos
387 \ statusColumnVisible supportedColumnPos supportedColumnVisible
388 \ vpanedPos windowWidth windowHeight windowX windowY closeZvt
389 \ color-available color-available-locked color-broken color-downgrade
390 \ color-install color-installed-locked color-installed-outdated
391 \ color-installed-updated color-new color-purge color-reinstall
392 \ color-remove color-upgrade
393
394 syn keyword aptconfSynapticUpdate contained
395 \ last type
396
397 syn cluster aptconfSynaptic_ contains=aptconfSynaptic,
398 \ aptconfSynapticUpdate
399 " }}}
400 " Unattended Upgrade: {{{
357 syn keyword aptconfUnattendedUpgrade contained 401 syn keyword aptconfUnattendedUpgrade contained
358 \ AutoFixInterruptedDpkg Automatic-Reboot InstallOnShutdown Mail 402 \ AutoFixInterruptedDpkg Automatic-Reboot Automatic-Reboot-Time
359 \ MailOnlyOnError MinimalSteps Origins-Pattern Package-Blacklist 403 \ Automatic-Reboot-WithUsers InstallOnShutdown Mail MailOnlyOnError
404 \ MinimalSteps Origins-Pattern Package-Blacklist
360 \ Remove-Unused-Dependencies 405 \ Remove-Unused-Dependencies
361 406
362 syn cluster aptconfUnattendedUpgrade_ contains=aptconfUnattendedUpgrade 407 syn cluster aptconfUnattendedUpgrade_ contains=aptconfUnattendedUpgrade
408 " }}}
409 " Whatmaps: {{{
410 syn keyword aptconfWhatmaps contained
411 \ Enable-Restart Security-Update-Origins
412
413 syn cluster aptconfWhatmaps_ contains=aptconfWhatmaps
363 " }}} 414 " }}}
364 415
365 syn case match 416 syn case match
366 417
367 " Now put all the keywords (and 'valid' options) in a single cluster: 418 " Now put all the keywords (and 'valid' options) in a single cluster:
368 syn cluster aptconfOptions contains=aptconfRegexpOpt, 419 syn cluster aptconfOptions contains=aptconfRegexpOpt,
369 \ @aptconfAcquire_,@aptconfApt_,@aptconfAptitude_,@aptconfDebTags_, 420 \ @aptconfAcquire_,@aptconfAdequate_,@aptconfApt_,@aptconfAptitude_,
370 \ @aptconfDebug_,@aptconfDir_,@aptconfDPkg_,@aptconfDSelect_, 421 \ @aptconfAptListbugs_,@aptconfDebTags_,@aptconfDebug_,@aptconfDir_,
371 \ @aptconfOrderList_,@aptconfPackageManager_,@aptconfPkgCacheGen_, 422 \ @aptconfDPkg_,@aptconfDSelect_,@aptconfOrderList_,
372 \ @aptconfQuiet_,@aptconfRpm_,@aptconfUnattendedUpgrade_ 423 \ @aptconfPackageManager_,@aptconfPkgCacheGen_,@aptconfQuiet_,
424 \ @aptconfRpm_,@aptconfSynaptic_,@aptconfUnattendedUpgrade_,
425 \ @aptconfWhatmaps_
373 426
374 " Syntax: 427 " Syntax:
375 syn match aptconfSemiColon ';' 428 syn match aptconfSemiColon ';'
376 syn match aptconfDoubleColon '::' 429 syn match aptconfDoubleColon '::'
377 syn match aptconfCurlyBraces '[{}]' 430 syn match aptconfCurlyBraces '[{}]'
380 syn region aptconfInclude matchgroup=aptconfOperator start='::' end='{'me=s-1 contains=@aptconfOptions,aptconfError display 433 syn region aptconfInclude matchgroup=aptconfOperator start='::' end='{'me=s-1 contains=@aptconfOptions,aptconfError display
381 syn region aptconfInclude matchgroup=aptconfOperator start='::' end='::\|\s'me=s-1 oneline contains=@aptconfOptions,aptconfError display 434 syn region aptconfInclude matchgroup=aptconfOperator start='::' end='::\|\s'me=s-1 oneline contains=@aptconfOptions,aptconfError display
382 435
383 " Basic Syntax Errors: XXX avoid to generate false positives !!! 436 " Basic Syntax Errors: XXX avoid to generate false positives !!!
384 " 437 "
385 " * Invalid comment format (seems to not cause errors, but...): 438 " * Undocumented inline comment. Since it is currently largely used, and does
386 syn match aptconfAsError display '^#.*' 439 " not seem to cause trouble ('apt-config dump' never complains when # is used
440 " the same way than //) it has been moved to aptconfComment group. But it
441 " still needs to be defined here (i.e. before #clear and #include directives)
442 syn match aptconfComment '#.*' contains=@aptconfCommentSpecial
387 " 443 "
388 " * When a semicolon is missing after a double-quoted string: 444 " * When a semicolon is missing after a double-quoted string:
389 " There are some cases (for example in the Dir group of options, but not only) 445 " There are some cases (for example in the Dir group of options, but not only)
390 " where this syntax is valid. So we don't treat it as a strict error. 446 " where this syntax is valid. So we don't treat it as a strict error.
391 syn match aptconfAsError display '"[^"]*"[^;]'me=e-1 447 syn match aptconfAsError display '"[^"]*"[^;]'me=e-1
443 hi def link aptconfAcquireHTTP aptconfOption 499 hi def link aptconfAcquireHTTP aptconfOption
444 hi def link aptconfAcquireHTTPS aptconfOption 500 hi def link aptconfAcquireHTTPS aptconfOption
445 hi def link aptconfAcquireMaxValidTime aptconfOption 501 hi def link aptconfAcquireMaxValidTime aptconfOption
446 hi def link aptconfAcquirePDiffs aptconfOption 502 hi def link aptconfAcquirePDiffs aptconfOption
447 503
504 hi def link aptconfAdequate aptconfOption
505
448 hi def link aptconfApt aptconfOption 506 hi def link aptconfApt aptconfOption
449 hi def link aptconfAptAuthentication aptconfOption 507 hi def link aptconfAptAuthentication aptconfOption
450 hi def link aptconfAptAutoRemove aptconfOption 508 hi def link aptconfAptAutoRemove aptconfOption
451 hi def link aptconfAptCache aptconfOption 509 hi def link aptconfAptCache aptconfOption
452 hi def link aptconfAptCDROM aptconfOption 510 hi def link aptconfAptCDROM aptconfOption
469 hi def link aptconfAptitudeUI aptconfOption 527 hi def link aptconfAptitudeUI aptconfOption
470 hi def link aptconfAptitudeUIKeyBindings aptconfOption 528 hi def link aptconfAptitudeUIKeyBindings aptconfOption
471 hi def link aptconfAptitudeUIStyles aptconfOption 529 hi def link aptconfAptitudeUIStyles aptconfOption
472 hi def link aptconfAptitudeUIStylesElements aptconfOption 530 hi def link aptconfAptitudeUIStylesElements aptconfOption
473 531
532 hi def link aptconfAptListbugs aptconfOption
533
474 hi def link aptconfDebTags aptconfOption 534 hi def link aptconfDebTags aptconfOption
475 535
476 hi def link aptconfDebug aptconfOption 536 hi def link aptconfDebug aptconfOption
477 hi def link aptconfDebugAcquire aptconfOption 537 hi def link aptconfDebugAcquire aptconfOption
478 hi def link aptconfDebugPkgAcquire aptconfOption 538 hi def link aptconfDebugPkgAcquire aptconfOption
502 562
503 hi def link aptconfQuiet aptconfOption 563 hi def link aptconfQuiet aptconfOption
504 564
505 hi def link aptconfRpm aptconfOption 565 hi def link aptconfRpm aptconfOption
506 566
567 hi def link aptconfSynaptic aptconfOption
568 hi def link aptconfSynapticUpdate aptconfOption
569
507 hi def link aptconfUnattendedUpgrade aptconfOption 570 hi def link aptconfUnattendedUpgrade aptconfOption
571
572 hi def link aptconfWhatmaps aptconfOption
508 573
509 let b:current_syntax = "aptconf" 574 let b:current_syntax = "aptconf"
510 575
511 let &cpo = s:cpo_save 576 let &cpo = s:cpo_save
512 unlet s:cpo_save 577 unlet s:cpo_save