neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

aptconf.vim (22441B)


      1 " Vim syntax file
      2 " Language:	APT config file
      3 " Maintainer:	Yann Amar <quidame@poivron.org>
      4 " Last Change:	2021 Jul 12
      5 
      6 " quit when a syntax file was already loaded
      7 if !exists("main_syntax")
      8  if exists("b:current_syntax")
      9    finish
     10  endif
     11  let main_syntax = 'aptconf'
     12 endif
     13 
     14 let s:cpo_save = &cpo
     15 set cpo&vim
     16 
     17 " Errors:
     18 " Catch all that is not overridden by next rules/items:
     19 syn match	aptconfError		display '[^[:blank:]]'
     20 syn match	aptconfError		display '^[^[:blank:]][^:{]*'
     21 
     22 " Options:
     23 " Define a general regular expression for the options that are not defined
     24 " later as keywords. Following apt.conf(5), we know that options are case
     25 " insensitive, and can contain alphanumeric characters and '/-:._+'; we
     26 " assume that there can not be consecutive colons (::) which is used as
     27 " syntax operator; we also assume that an option name can not start or end
     28 " by a colon.
     29 syn case	ignore
     30 syn match	aptconfRegexpOpt	'[-[:alnum:]/.+_]\+\(:[-[:alnum:]/.+_]\+\)*' contained display
     31 
     32 " Keywords:
     33 setlocal iskeyword+=/,-,.,_,+
     34 "setlocal iskeyword+=: is problematic, because of the '::' separator
     35 
     36 " Incomplete keywords will be treated differently than completely bad strings:
     37 syn keyword	aptconfGroupIncomplete
     38 \ a[cquire] a[dequate] a[ptitude] a[ptlistbugs] d[ebtags] d[ebug]
     39 \ d[ir] d[pkg] d[select] o[rderlist] p[ackagemanager] p[kgcachegen]
     40 \ q[uiet] r[pm] s[ynaptic] u[nattended-upgrade] w[hatmaps]
     41 
     42 " Only the following keywords can be used at toplevel (to begin an option):
     43 syn keyword	aptconfGroup
     44 \ acquire adequate apt aptitude aptlistbugs debtags debug
     45 \ dir dpkg dselect orderlist packagemanager pkgcachegen
     46 \ quiet rpm synaptic unattended-upgrade whatmaps
     47 
     48 " Possible options for each group:
     49 " Acquire: {{{
     50 syn keyword	aptconfAcquire contained
     51 \ cdrom Check-Valid-Until CompressionTypes ForceHash ForceIPv4
     52 \ ForceIPv6 ftp gpgv GzipIndexes http https Languages Max-ValidTime
     53 \ Min-ValidTime PDiffs Queue-Mode Retries Source-Symlinks
     54 
     55 syn keyword	aptconfAcquireCDROM contained
     56 \ AutoDetect CdromOnly Mount UMount
     57 
     58 syn keyword	aptconfAcquireCompressionTypes contained
     59 \ bz2 lzma gz Order
     60 
     61 syn keyword	aptconfAcquireFTP contained
     62 \ ForceExtended Passive Proxy ProxyLogin Timeout
     63 
     64 syn keyword	aptconfAcquireHTTP contained
     65 \ AllowRedirect Dl-Limit Max-Age No-Cache No-Store Pipeline-Depth
     66 \ Proxy ProxyAutoDetect Proxy-Auto-Detect Timeout User-Agent
     67 
     68 syn keyword	aptconfAcquireHTTPS contained
     69 \ AllowRedirect CaInfo CaPath CrlFile Dl-Limit IssuerCert Max-Age
     70 \ No-Cache No-Store Proxy SslCert SslForceVersion SslKey Timeout
     71 \ Verify-Host Verify-Peer
     72 
     73 syn keyword	aptconfAcquireMaxValidTime contained
     74 \ Debian Debian-Security
     75 
     76 syn keyword	aptconfAcquirePDiffs contained
     77 \ FileLimit SizeLimit
     78 
     79 syn cluster	aptconfAcquire_ contains=aptconfAcquire,
     80 \ aptconfAcquireCDROM,aptconfAcquireCompressionTypes,aptconfAcquireFTP,
     81 \ aptconfAcquireHTTP,aptconfAcquireHTTPS,aptconfAcquireMaxValidTime,
     82 \ aptconfAcquirePDiffs
     83 " }}}
     84 " Adequate: {{{
     85 syn keyword	aptconfAdequate contained
     86 \ Enabled
     87 
     88 syn cluster	aptconfAdequate_ contains=aptconfAdequate
     89 " }}}
     90 " Apt: {{{
     91 syn keyword	aptconfApt contained
     92 \ Architecture Architectures Archive Authentication AutoRemove
     93 \ Build-Essential Build-Profiles Cache Cache-Grow Cache-Limit
     94 \ Cache-Start CDROM Changelogs Clean-Installed Compressor
     95 \ Default-Release Force-LoopBreak Get Ignore-Hold Immediate-Configure
     96 \ Install-Recommends Install-Suggests Keep-Fds List-Cleanup
     97 \ Move-Autobit-Sections NeverAutoRemove Never-MarkAuto-Sections
     98 \ Periodic Status-Fd Update VersionedKernelPackages
     99 
    100 syn keyword	aptconfAptAuthentication contained
    101 \ TrustCDROM
    102 
    103 syn keyword	aptconfAptAutoRemove contained
    104 \ RecommendsImportant SuggestsImportant
    105 
    106 syn keyword	aptconfAptCache contained
    107 \ AllNames AllVersions Generate GivenOnly Important Installed NamesOnly
    108 \ RecurseDepends ShowFull
    109 
    110 syn keyword	aptconfAptCDROM contained
    111 \ Fast NoAct NoMount Rename
    112 
    113 syn keyword	aptconfAptChangelogs contained
    114 \ Server
    115 
    116 syn keyword	aptconfAptCompressor contained
    117 \ bzip2 gzip lzma xz
    118 
    119 syn keyword	aptconfAptCompressorAll contained
    120 \ Binary CompressArg Cost Extension Name UncompressArg
    121 
    122 syn keyword	aptconfAptGet contained
    123 \ AllowUnauthenticated Arch-Only Assume-No Assume-Yes AutomaticRemove
    124 \ Build-Dep-Automatic Compile Diff-Only Download Download-Only Dsc-Only
    125 \ Fix-Broken Fix-Missing Force-Yes HideAutoRemove Host-Architecture
    126 \ List-Cleanup Only-Source Print-URIs Purge ReInstall Remove
    127 \ Show-Upgraded Show-User-Simulation-Note Show-Versions Simulate
    128 \ Tar-Only Trivial-Only Upgrade
    129 
    130 syn keyword	aptconfAptPeriodic contained
    131 \ AutocleanInterval BackupArchiveInterval BackupLevel
    132 \ Download-Upgradeable-Packages Download-Upgradeable-Packages-Debdelta
    133 \ Enable MaxAge MaxSize MinAge Unattended-Upgrade Update-Package-Lists
    134 \ Verbose
    135 
    136 syn keyword	aptconfAptUpdate contained
    137 \ List-Refresh Pre-Invoke Post-Invoke Post-Invoke-Success
    138 
    139 syn cluster	aptconfApt_ contains=aptconfApt,
    140 \ aptconfAptAuthentication,aptconfAptAutoRemove,aptconfAptCache,
    141 \ aptconfAptCDROM,aptconfAptChangelogs,aptconfAptCompressor,
    142 \ aptconfAptCompressorAll,aptconfAptGet,aptconfAptPeriodic,
    143 \ aptconfAptUpdate
    144 " }}}
    145 " Aptitude: {{{
    146 syn keyword	aptconfAptitude contained
    147 \ Allow-Null-Upgrade Always-Use-Safe-Resolver Autoclean-After-Update
    148 \ Auto-Install Auto-Fix-Broken Cmdline Debtags-Binary
    149 \ Debtags-Update-Options Delete-Unused Delete-Unused-Pattern
    150 \ Display-Planned-Action Forget-New-On-Install Forget-New-On-Update
    151 \ Get-Root-Command Ignore-Old-Tmp Ignore-Recommends-Important
    152 \ Keep-Recommends Keep-Suggests Keep-Unused-Pattern LockFile Log
    153 \ Logging Parse-Description-Bullets Pkg-Display-Limit ProblemResolver
    154 \ Purge-Unused Recommends-Important Safe-Resolver Screenshot Sections
    155 \ Simulate Spin-Interval Suggests-Important Suppress-Read-Only-Warning
    156 \ Theme Track-Dselect-State UI Warn-Not-Root
    157 
    158 syn keyword	aptconfAptitudeCmdline contained
    159 \ Always-Prompt Assume-Yes Disable-Columns Download-Only Fix-Broken
    160 \ Ignore-Trust-Violations Package-Display-Format Package-Display-Width
    161 \ Progress Request-Strictness Resolver-Debug Resolver-Dump
    162 \ Resolver-Show-Steps Safe-Upgrade Show-Deps Show-Size-Changes
    163 \ Show-Versions Show-Why Simulate Verbose Version-Display-Format
    164 \ Versions-Group-By Versions-Show-Package-Names Visual-Preview
    165 \ Why-Display-Mode
    166 
    167 syn keyword	aptconfAptitudeCmdlineProgress contained
    168 \ Percent-On-Right Retain-Completed
    169 
    170 syn keyword	aptconfAptitudeCmdlineSafeUpgrade contained
    171 \ No-New-Installs
    172 
    173 syn keyword	aptconfAptitudeLogging contained
    174 \ File Levels
    175 
    176 syn keyword	aptconfAptitudeProblemResolver contained
    177 \ Allow-Break-Holds BreakHoldScore Break-Hold-Level BrokenScore
    178 \ DefaultResolutionScore Discard-Null-Solution
    179 \ EssentialRemoveScore ExtraScore FullReplacementScore FutureHorizon
    180 \ Hints ImportantScore Infinity InstallScore Keep-All-Level KeepScore
    181 \ NonDefaultScore Non-Default-Level OptionalScore PreserveAutoScore
    182 \ PreserveManualScore RemoveScore Remove-Essential-Level Remove-Level
    183 \ RequiredScore ResolutionScore Safe-Level SolutionCost StandardScore
    184 \ StepLimit StepScore Trace-Directory Trace-File
    185 \ UndoFullReplacementScore UnfixedSoftScore UpgradeScore
    186 
    187 syn keyword	aptconfAptitudeSafeResolver contained
    188 \ No-New-Installs No-New-Upgrades Show-Resolver-Actions
    189 
    190 syn keyword	aptconfAptitudeScreenshot contained
    191 \ Cache-Max IncrementalLoadLimit
    192 
    193 syn keyword	aptconfAptitudeSections contained
    194 \ Descriptions Top-Sections
    195 
    196 syn keyword	aptconfAptitudeUI contained
    197 \ Advance-On-Action Auto-Show-Reasons Default-Grouping
    198 \ Default-Package-View Default-Preview-Grouping Default-Sorting
    199 \ Description-Visible-By-Default Exit-On-Last-Close Fill-Text
    200 \ Flat-View-As-First-View HelpBar Incremental-Search InfoAreaTabs
    201 \ KeyBindings MenuBar-Autohide Minibuf-Download-Bar Minibuf-Prompts
    202 \ New-package-Commands Package-Display-Format Package-Header-Format
    203 \ Package-Status-Format Pause-After-Download Preview-Limit
    204 \ Prompt-On-Exit Styles ViewTabs
    205 
    206 syn keyword	aptconfAptitudeUIKeyBindings contained
    207 \ ApplySolution Begin BugReport Cancel Changelog ChangePkgTreeGrouping
    208 \ ChangePkgTreeLimit ChangePkgTreeSorting ClearAuto CollapseAll
    209 \ CollapseTree Commit Confirm Cycle CycleNext CycleOrder CyclePrev
    210 \ DelBOL DelBack DelEOL DelForward Dependencies DescriptionCycle
    211 \ DescriptionDown DescriptionUp DoInstallRun Down DpkgReconfigure
    212 \ DumpResolver EditHier End ExamineSolution ExpandAll ExpandTree
    213 \ FirstSolution ForbidUpgrade ForgetNewPackages Help HistoryNext
    214 \ HistoryPrev Hold Install InstallSingle Keep LastSolution Left
    215 \ LevelDown LevelUp MarkUpgradable MineFlagSquare MineLoadGame
    216 \ MineSaveGame MineSweepSquare MineUncoverSquare MineUncoverSweepSquare
    217 \ NextPage NextSolution No Parent PrevPage PrevSolution Purge
    218 \ PushButton Quit QuitProgram RejectBreakHolds Refresh Remove
    219 \ ReInstall RepeatSearchBack ReSearch ReverseDependencies Right
    220 \ SaveHier Search SearchBack SearchBroken SetAuto ShowHideDescription
    221 \ SolutionActionApprove SolutionActionReject ToggleExpanded
    222 \ ToggleMenuActive Undo Up UpdatePackageList Versions Yes
    223 
    224 syn keyword	aptconfAptitudeUIStyles contained
    225 \ Bullet ChangeLogNewerVersion Default DepBroken DisabledMenuEntry
    226 \ DownloadHit DownloadProgress EditLine Error Header HighlightedMenuBar
    227 \ HighlightedMenuEntry MediaChange MenuBar MenuBorder MenuEntry
    228 \ MineBomb MineBorder MineFlag MineNumber1 MineNumber2 MineNumber3
    229 \ MineNumber4 MineNumber5 MineNumber6 MineNumber7 MineNumber8
    230 \ MultiplexTab MultiplexTabHighlighted PkgBroken PkgBrokenHighlighted
    231 \ PkgIsInstalled PkgIsInstalledHighlighted PkgNotInstalled
    232 \ PkgNotInstalledHighlighted PkgToDowngrade PkgToDowngradeHighlighted
    233 \ PkgToHold PkgToHoldHighlighted PkgToInstall PkgToInstallHighlighted
    234 \ PkgToRemove PkgToRemoveHighlighted PkgToUpgrade
    235 \ PkgToUpgradeHighlighted Progress SolutionActionApproved
    236 \ SolutionActionRejected Status TreeBackground TrustWarning
    237 
    238 syn keyword	aptconfAptitudeUIStylesElements contained
    239 \ bg clear fg flip set
    240 
    241 syn cluster	aptconfAptitude_ contains=aptconfAptitude,
    242 \ aptconfAptitudeCmdline,aptconfAptitudeCmdlineProgress,
    243 \ aptconfAptitudeCmdlineSafeUpgrade,aptconfAptitudeLogging,
    244 \ aptconfAptitudeProblemResolver,aptconfAptitudeSafeResolver,
    245 \ aptconfAptitudeScreenshot,aptconfAptitudeSections,aptconfAptitudeUI,
    246 \ aptconfAptitudeUIKeyBindings,aptconfAptitudeUIStyles,
    247 \ aptconfAptitudeUIStylesElements
    248 " }}}
    249 " AptListbugs: {{{
    250 syn keyword	aptconfAptListbugs contained
    251 \ IgnoreRegexp Severities
    252 
    253 syn cluster	aptconfAptListbugs_ contains=aptconfAptListbugs
    254 " }}}
    255 " DebTags: {{{
    256 syn keyword	aptconfDebTags contained
    257 \ Vocabulary
    258 
    259 syn cluster	aptconfDebTags_ contains=aptconfDebTags
    260 " }}}
    261 " Debug: {{{
    262 syn keyword	aptconfDebug contained
    263 \ Acquire aptcdrom BuildDeps Hashes IdentCdrom Nolocking
    264 \ pkgAcquire pkgAutoRemove pkgCacheGen pkgDepCache pkgDPkgPM
    265 \ pkgDPkgProgressReporting pkgInitialize pkgOrderList
    266 \ pkgPackageManager pkgPolicy pkgProblemResolver RunScripts
    267 \ sourceList
    268 
    269 syn keyword	aptconfDebugAcquire contained
    270 \ cdrom Ftp gpgv Http Https netrc
    271 
    272 syn keyword	aptconfDebugPkgAcquire contained
    273 \ Auth Diffs RRed Worker
    274 
    275 syn keyword	aptconfDebugPkgDepCache contained
    276 \ AutoInstall Marker
    277 
    278 syn keyword	aptconfDebugPkgProblemResolver contained
    279 \ ShowScores
    280 
    281 syn cluster	aptconfDebug_ contains=aptconfDebug,
    282 \ aptconfDebugAcquire,aptconfDebugPkgAcquire,aptconfDebugPkgDepCache,
    283 \ aptconfDebugPkgProblemResolver
    284 " }}}
    285 " Dir: {{{
    286 syn keyword	aptconfDir contained
    287 \ Aptitude Bin Cache Etc Ignore-Files-Silently Log Media Parts RootDir
    288 \ State
    289 
    290 syn keyword	aptconfDirAptitude contained
    291 \ state
    292 
    293 syn keyword	aptconfDirBin contained
    294 \ apt-get apt-cache dpkg dpkg-buildpackage dpkg-source gpg gzip Methods
    295 \ solvers
    296 
    297 syn keyword	aptconfDirCache contained
    298 \ Archives Backup pkgcache srcpkgcache
    299 
    300 syn keyword	aptconfDirEtc contained
    301 \ Main Netrc Parts Preferences PreferencesParts SourceList SourceParts
    302 \ VendorList VendorParts Trusted TrustedParts
    303 
    304 syn keyword	aptconfDirLog contained
    305 \ History Terminal
    306 
    307 syn keyword	aptconfDirMedia contained
    308 \ MountPath
    309 
    310 syn keyword	aptconfDirState contained
    311 \ cdroms extended_states Lists mirrors preferences status
    312 
    313 syn cluster	aptconfDir_ contains=aptconfDir,
    314 \ aptconfDirAptitude,aptconfDirBin,aptconfDirCache,aptconfDirEtc,
    315 \ aptconfDirLog,aptconfDirMedia,aptconfDirState
    316 " }}}
    317 " DPkg: {{{
    318 syn keyword	aptconfDPkg contained
    319 \ Build-Options Chroot-Directory ConfigurePending FlushSTDIN
    320 \ MaxArgBytes MaxArgs MaxBytes NoTriggers options
    321 \ Pre-Install-Pkgs Pre-Invoke Post-Invoke
    322 \ Run-Directory StopOnError Tools TriggersPending
    323 
    324 syn keyword	aptconfDPkgTools contained
    325 \ adequate InfoFD Options Version
    326 
    327 syn cluster	aptconfDPkg_ contains=aptconfDPkg,
    328 \ aptconfDPkgTools
    329 " }}}
    330 " DSelect: {{{
    331 syn keyword	aptconfDSelect contained
    332 \ CheckDir Clean Options PromptAfterUpdate UpdateOptions
    333 
    334 syn cluster	aptconfDSelect_ contains=aptconfDSelect
    335 " }}}
    336 " OrderList: {{{
    337 syn keyword	aptconfOrderList contained
    338 \ Score
    339 
    340 syn keyword	aptconfOrderListScore contained
    341 \ Delete Essential Immediate PreDepends
    342 
    343 syn cluster	aptconfOrderList_ contains=aptconfOrderList,
    344 \ aptconfOrderListScore
    345 " }}}
    346 " PackageManager: {{{
    347 syn keyword	aptconfPackageManager contained
    348 \ Configure
    349 
    350 syn cluster	aptconfPackageManager_ contains=aptconfPackageManager
    351 " }}}
    352 " PkgCacheGen: {{{
    353 syn keyword	aptconfPkgCacheGen contained
    354 \ Essential
    355 
    356 syn cluster	aptconfPkgCacheGen_ contains=aptconfPkgCacheGen
    357 " }}}
    358 " Quiet: {{{
    359 syn keyword	aptconfQuiet contained
    360 \ NoUpdate
    361 
    362 syn cluster	aptconfQuiet_ contains=aptconfQuiet
    363 " }}}
    364 " Rpm: {{{
    365 syn keyword	aptconfRpm contained
    366 \ Post-Invoke Pre-Invoke
    367 
    368 syn cluster	aptconfRpm_ contains=aptconfRpm
    369 " }}}
    370 " Synaptic: {{{
    371 syn keyword	aptconfSynaptic contained
    372 \ AskQuitOnProceed AskRelated AutoCleanCache CleanCache DefaultDistro
    373 \ delAction delHistory Download-Only ftpProxy ftpProxyPort httpProxy
    374 \ httpProxyPort Install-Recommends LastSearchType Maximized noProxy
    375 \ OneClickOnStatusActions ShowAllPkgInfoInMain showWelcomeDialog
    376 \ ToolbarState undoStackSize update upgradeType useProxy UseStatusColors
    377 \ UseTerminal useUserFont useUserTerminalFont ViewMode
    378 \ availVerColumnPos availVerColumnVisible componentColumnPos
    379 \ componentColumnVisible descrColumnPos descrColumnVisible
    380 \ downloadSizeColumnPos downloadSizeColumnVisible hpanedPos
    381 \ instVerColumnPos instVerColumnVisible instSizeColumnPos
    382 \ instSizeColumnVisible nameColumnPos nameColumnVisible
    383 \ sectionColumnPos sectionColumnVisible statusColumnPos
    384 \ statusColumnVisible supportedColumnPos supportedColumnVisible
    385 \ vpanedPos windowWidth windowHeight windowX windowY closeZvt
    386 \ color-available color-available-locked color-broken color-downgrade
    387 \ color-install color-installed-locked color-installed-outdated
    388 \ color-installed-updated color-new color-purge color-reinstall
    389 \ color-remove color-upgrade
    390 
    391 syn keyword	aptconfSynapticUpdate contained
    392 \ last type
    393 
    394 syn cluster	aptconfSynaptic_ contains=aptconfSynaptic,
    395 \ aptconfSynapticUpdate
    396 " }}}
    397 " Unattended Upgrade: {{{
    398 syn keyword	aptconfUnattendedUpgrade contained
    399 \ Allow-APT-Mark-Fallback Allow-downgrade AutoFixInterruptedDpkg
    400 \ Automatic-Reboot Automatic-Reboot-Time Automatic-Reboot-WithUsers
    401 \ Debug InstallOnShutdown Mail MailOnlyOnError MailReport MinimalSteps
    402 \ OnlyOnACPower Origins-Pattern Package-Blacklist
    403 \ Remove-New-Unused-Dependencies Remove-Unused-Dependencies
    404 \ Remove-Unused-Kernel-Packages Skip-Updates-On-Metered-Connections
    405 \ SyslogEnable SyslogFacility Verbose
    406 
    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
    414 " }}}
    415 
    416 syn case	match
    417 
    418 " Now put all the keywords (and 'valid' options) in a single cluster:
    419 syn cluster	aptconfOptions contains=aptconfRegexpOpt,
    420 \ @aptconfAcquire_,@aptconfAdequate_,@aptconfApt_,@aptconfAptitude_,
    421 \ @aptconfAptListbugs_,@aptconfDebTags_,@aptconfDebug_,@aptconfDir_,
    422 \ @aptconfDPkg_,@aptconfDSelect_,@aptconfOrderList_,
    423 \ @aptconfPackageManager_,@aptconfPkgCacheGen_,@aptconfQuiet_,
    424 \ @aptconfRpm_,@aptconfSynaptic_,@aptconfUnattendedUpgrade_,
    425 \ @aptconfWhatmaps_
    426 
    427 " Syntax:
    428 syn match	aptconfSemiColon	';'
    429 syn match	aptconfDoubleColon	'::'
    430 syn match	aptconfCurlyBraces	'[{}]'
    431 syn region	aptconfValue		start='"' end='"' oneline display
    432 syn region	aptconfInclude		matchgroup=aptconfOperator start='{' end='}' contains=ALLBUT,aptconfGroup,aptconfGroupIncomplete,@aptconfCommentSpecial
    433 syn region	aptconfInclude		matchgroup=aptconfOperator start='::' end='{'me=s-1 contains=@aptconfOptions,aptconfError display
    434 syn region	aptconfInclude		matchgroup=aptconfOperator start='::' end='::\|\s'me=s-1 oneline contains=@aptconfOptions,aptconfError display
    435 
    436 " Basic Syntax Errors: XXX avoid to generate false positives !!!
    437 "
    438 " * Undocumented inline comment. Since it is currently largely used, and does
    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
    443 "
    444 " * When a semicolon is missing after a double-quoted string:
    445 " There are some cases (for example in the Dir group of options, but not only)
    446 " where this syntax is valid. So we don't treat it as a strict error.
    447 syn match	aptconfAsError		display '"[^"]*"[^;]'me=e-1
    448 syn match	aptconfAsError		display '"[^"]*"$'
    449 "
    450 " * When double quotes are missing around a value (before a semicolon):
    451 " This omission has no effect if the value is a single string (without blank
    452 " characters). But apt.conf(5) says that quotes are required, and this item
    453 " avoids to match unquoted keywords.
    454 syn match	aptconfAsError		display '\s[^"[:blank:]]*[^}"];'me=e-1
    455 "
    456 " * When only one double quote is missing around a value (before a semicolon):
    457 " No comment for that: it must be highly visible.
    458 syn match	aptconfError		display '\(\s\|;\)"[^"[:blank:]]\+;'me=e-1
    459 syn match	aptconfError		display '\(\s\|;\)[^"[:blank:]]\+";'me=e-1
    460 "
    461 " * When space is missing between option and (quoted) value:
    462 " TODO (partially implemented)
    463 syn match	aptconfError		display '::[^[:blank:]]*"'
    464 
    465 " Special Actions:
    466 syn match	aptconfAction		'^#\(clear\|include\)\>'
    467 syn region	aptconfAction		matchgroup=aptconfAction start='^#clear\>' end=';'me=s-1 oneline contains=aptconfGroup,aptconfDoubleColon,@aptconfOptions
    468 syn region	aptconfAction		matchgroup=aptconfAction start='^#include\>' end=';'me=s-1 oneline contains=aptconfRegexpOpt
    469 
    470 " Comments:
    471 syn keyword	aptconfTodo		TODO FIXME NOTE XXX contained
    472 syn cluster	aptconfCommentSpecial	contains=@Spell,aptconfTodo
    473 syn match	aptconfComment		'//.*' contains=@aptconfCommentSpecial
    474 syn region	aptconfComment		start='/\*' end='\*/' contains=@aptconfCommentSpecial
    475 
    476 " Highlight Definitions:
    477 hi def link aptconfTodo				Todo
    478 hi def link aptconfError			Error
    479 hi def link aptconfComment			Comment
    480 hi def link aptconfOperator			Operator
    481 
    482 hi def link aptconfAction			PreProc
    483 hi def link aptconfOption			Type
    484 hi def link aptconfValue			String
    485 hi def link aptconfRegexpOpt			Normal
    486 hi def link aptconfAsError			Special
    487 
    488 hi def link aptconfSemiColon			aptconfOperator
    489 hi def link aptconfDoubleColon			aptconfOperator
    490 hi def link aptconfCurlyBraces			aptconfOperator
    491 
    492 hi def link aptconfGroupIncomplete		Special
    493 hi def link aptconfGroup			aptconfOption
    494 
    495 hi def link aptconfAcquire			aptconfOption
    496 hi def link aptconfAcquireCDROM			aptconfOption
    497 hi def link aptconfAcquireCompressionTypes	aptconfOption
    498 hi def link aptconfAcquireFTP			aptconfOption
    499 hi def link aptconfAcquireHTTP			aptconfOption
    500 hi def link aptconfAcquireHTTPS			aptconfOption
    501 hi def link aptconfAcquireMaxValidTime		aptconfOption
    502 hi def link aptconfAcquirePDiffs		aptconfOption
    503 
    504 hi def link aptconfAdequate			aptconfOption
    505 
    506 hi def link aptconfApt				aptconfOption
    507 hi def link aptconfAptAuthentication		aptconfOption
    508 hi def link aptconfAptAutoRemove		aptconfOption
    509 hi def link aptconfAptCache			aptconfOption
    510 hi def link aptconfAptCDROM			aptconfOption
    511 hi def link aptconfAptChangelogs		aptconfOption
    512 hi def link aptconfAptCompressor		aptconfOption
    513 hi def link aptconfAptCompressorAll		aptconfOption
    514 hi def link aptconfAptGet			aptconfOption
    515 hi def link aptconfAptPeriodic			aptconfOption
    516 hi def link aptconfAptUpdate			aptconfOption
    517 
    518 hi def link aptconfAptitude			aptconfOption
    519 hi def link aptconfAptitudeCmdline		aptconfOption
    520 hi def link aptconfAptitudeCmdlineProgress	aptconfOption
    521 hi def link aptconfAptitudeCmdlineSafeUpgrade	aptconfOption
    522 hi def link aptconfAptitudeLogging		aptconfOption
    523 hi def link aptconfAptitudeProblemResolver	aptconfOption
    524 hi def link aptconfAptitudeSafeResolver		aptconfOption
    525 hi def link aptconfAptitudeScreenshot		aptconfOption
    526 hi def link aptconfAptitudeSections		aptconfOption
    527 hi def link aptconfAptitudeUI			aptconfOption
    528 hi def link aptconfAptitudeUIKeyBindings	aptconfOption
    529 hi def link aptconfAptitudeUIStyles		aptconfOption
    530 hi def link aptconfAptitudeUIStylesElements	aptconfOption
    531 
    532 hi def link aptconfAptListbugs			aptconfOption
    533 
    534 hi def link aptconfDebTags			aptconfOption
    535 
    536 hi def link aptconfDebug			aptconfOption
    537 hi def link aptconfDebugAcquire			aptconfOption
    538 hi def link aptconfDebugPkgAcquire		aptconfOption
    539 hi def link aptconfDebugPkgDepCache		aptconfOption
    540 hi def link aptconfDebugPkgProblemResolver	aptconfOption
    541 
    542 hi def link aptconfDir				aptconfOption
    543 hi def link aptconfDirAptitude			aptconfOption
    544 hi def link aptconfDirBin			aptconfOption
    545 hi def link aptconfDirCache			aptconfOption
    546 hi def link aptconfDirEtc			aptconfOption
    547 hi def link aptconfDirLog			aptconfOption
    548 hi def link aptconfDirMedia			aptconfOption
    549 hi def link aptconfDirState			aptconfOption
    550 
    551 hi def link aptconfDPkg				aptconfOption
    552 hi def link aptconfDPkgTools			aptconfOption
    553 
    554 hi def link aptconfDSelect			aptconfOption
    555 
    556 hi def link aptconfOrderList			aptconfOption
    557 hi def link aptconfOrderListScore		aptconfOption
    558 
    559 hi def link aptconfPackageManager		aptconfOption
    560 
    561 hi def link aptconfPkgCacheGen			aptconfOption
    562 
    563 hi def link aptconfQuiet			aptconfOption
    564 
    565 hi def link aptconfRpm				aptconfOption
    566 
    567 hi def link aptconfSynaptic			aptconfOption
    568 hi def link aptconfSynapticUpdate		aptconfOption
    569 
    570 hi def link aptconfUnattendedUpgrade		aptconfOption
    571 
    572 hi def link aptconfWhatmaps			aptconfOption
    573 
    574 let b:current_syntax = "aptconf"
    575 
    576 let &cpo = s:cpo_save
    577 unlet s:cpo_save