home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unix / vim-6.2.tar.bz2 / vim-6.2.tar / vim62 / runtime / syntax / fstab.vim < prev    next >
Encoding:
Text File  |  2003-04-30  |  9.0 KB  |  209 lines

  1. " Vim syntax file
  2. " Language:    fstab file
  3. " Maintaner:    Radu Dineiu <littledragon@altern.org>
  4. " URL:        http://ld.yi.org/vim/fstab.vim
  5. " ChangeLog:    http://ld.yi.org/vim/fstab.ChangeLog
  6. " Last Change:    2003 Apr 30
  7. " Version:    0.61
  8.  
  9. if version < 600
  10.     syntax clear
  11. elseif exists("b:current_syntax")
  12.     finish
  13. endif
  14.  
  15. " General
  16. syn cluster fsGeneralCluster contains=fsComment
  17. syn match fsComment /\s*#.*/
  18. syn match fsOperator /[,=]/
  19.  
  20. " Device
  21. syn cluster fsDeviceCluster contains=fsOperator,fsDeviceKeyword,fsDeviceError
  22. syn match fsDeviceError /\%([^a-zA-Z0-9_\/#@]\|^\w\{-}\ze\W\)/ contained
  23. syn keyword fsDeviceKeyword contained none proc linproc tmpfs
  24. syn keyword fsDeviceKeyword contained LABEL nextgroup=fsDeviceLabel
  25. syn match fsDeviceLabel contained /=[^ \t]\+/hs=s+1 contains=fsOperator
  26.  
  27. " Mount Point
  28. syn cluster fsMountPointCluster contains=fsMountPointKeyword,fsMountPointError
  29. syn match fsMountPointError /\%([^ \ta-zA-Z0-9_\/#@]\|\s\+\zs\w\{-}\ze\s\)/ contained
  30. syn keyword fsMountPointKeyword contained none swap
  31.  
  32. " Type
  33. syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeError
  34. syn match fsTypeError /\s\+\zs\w\+/ contained
  35. syn keyword fsTypeKeyword contained adfs affs auto autofs cd9660 coda cramfs devfs devpts efs ext2 ext3 fdesc hfs hpfs iso9660 kernfs linprocfs mfs minix msdos ncpfs nfs ntfs nwfs null portal proc procfs qnx4 reiserfs romfs smbfs std sysv swap tmpfs udf ufs umap umsdos union vfat xfs
  36.  
  37. " Options
  38. " -------
  39. " Options: General
  40. syn cluster fsOptionsCluster contains=fsOperator,fsOptionsGeneral,fsOptionsKeywords,fsTypeError
  41. syn match fsOptionsNumber /\d\+/
  42. syn match fsOptionsNumberOctal /[0-8]\+/
  43. syn match fsOptionsString /[a-zA-Z0-9_-]\+/
  44. syn keyword fsOptionsYesNo yes no
  45. syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck
  46. syn keyword fsOptionsSize 512 1024 2048
  47. syn keyword fsOptionsGeneral async atime auto current defaults dev exec force fstab noatime noauto noclusterr noclusterw nodev noexec nosuid nosymfollow nouser owner ro rdonly rw rq sw xx suid suiddir sync kudzu union update user supermount
  48. syn match fsOptionsGeneral /_netdev/
  49.  
  50. " Options: adfs
  51. syn match fsOptionsKeywords contained /\%([ug]id\|o\%(wn\|th\)mask\)=/ nextgroup=fsOptionsNumber
  52.  
  53. " Options: affs
  54. syn match fsOptionsKeywords contained /\%(set[ug]id\|mode\|reserved\)=/ nextgroup=fsOptionsNumber
  55. syn match fsOptionsKeywords contained /\%(prefix\|volume\|root\)=/ nextgroup=fsOptionsString
  56. syn match fsOptionsKeywords contained /bs=/ nextgroup=fsOptionsSize
  57. syn keyword fsOptionsKeywords contained protect usemp verbose
  58.  
  59. " Options: cd9660
  60. syn keyword fsOptionsKeywords contained extatt gens norrip nostrictjoilet
  61.  
  62. " Options: devpts
  63. " -- everything already defined
  64.  
  65. " Options: ext2
  66. syn match fsOptionsKeywords contained /check=*/ nextgroup=@fsOptionsCheckCluster
  67. syn match fsOptionsKeywords contained /errors=/ nextgroup=fsOptionsExt2Errors
  68. syn match fsOptionsKeywords contained /\%(res[gu]id\|sb\)=/ nextgroup=fsOptionsNumber
  69. syn keyword fsOptionsExt2Check contained none normal strict
  70. syn keyword fsOptionsExt2Errors contained continue panic
  71. syn match fsOptionsExt2Errors contained /remount-ro/
  72. syn keyword fsOptionsKeywords contained bsddf minixdf debug grpid bsdgroups nocheck nogrpid sysvgroups nouid32
  73.  
  74. " Options: ext3
  75. syn match fsOptionsKeywords contained /journal=/ nextgroup=fsOptionsExt3Journal
  76. syn match fsOptionsKeywords contained /data=/ nextgroup=fsOptionsExt3Data
  77. syn keyword fsOptionsExt3Journal contained update inum
  78. syn keyword fsOptionsExt3Data contained journal ordered writeback
  79. syn keyword fsOptionsKeywords contained noload
  80.  
  81. " Options: fat
  82. syn match fsOptionsKeywords contained /blocksize=/ nextgroup=fsOptionsSize
  83. syn match fsOptionsKeywords contained /\%([dfu]mask\|codepage\)=/ nextgroup=fsOptionsNumberOctal
  84. syn match fsOptionsKeywords contained /\%(cvf_\%(format\|option\)\|iocharset\)=/ nextgroup=fsOptionsString
  85. syn match fsOptionsKeywords contained /check=/ nextgroup=@fsOptionsCheckCluster
  86. syn match fsOptionsKeywords contained /conv=*/ nextgroup=fsOptionsConv
  87. syn match fsOptionsKeywords contained /fat=/ nextgroup=fsOptionsFatType
  88. syn match fsOptionsKeywords contained /dotsOK=/ nextgroup=fsOptionsYesNo
  89. syn keyword fsOptionsFatCheck contained r n s relaxed normal strict
  90. syn keyword fsOptionsConv contained b t a binary text auto
  91. syn keyword fsOptionsFatType contained 12 16 32
  92. syn keyword fsOptionsKeywords contained quiet sys_immutable showexec dots nodots
  93.  
  94. " Options: hpfs
  95. syn match fsOptionsKeywords contained /case=/ nextgroup=fsOptionsHpfsCase
  96. syn keyword fsOptionsHpfsCase contained lower asis
  97.  
  98. " Options: iso9660
  99. syn match fsOptionsKeywords contained /map=/ nextgroup=fsOptionsIsoMap
  100. syn match fsOptionsKeywords contained /block=/ nextgroup=fsOptionsSize
  101. syn match fsOptionsKeywords contained /\%(session\|sbsector\)=/ nextgroup=fsOptionsNumber
  102. syn keyword fsOptionsIsoMap contained n o a normal off acorn
  103. syn keyword fsOptionsKeywords contained norock nojoilet unhide cruft
  104. syn keyword fsOptionsConv contained m mtext
  105.  
  106. " Options: nfs
  107. syn match fsOptionsKeywords contained /\%(rsize\|wsize\|timeo\|retrans\|acregmin\|acregmax\|acdirmin\|acdirmax\|actimeo\|retry\|port\|mountport\|mounthost\|mountprog\|mountvers\|nfsprog\|nfsvers\|namelen\)=/ nextgroup=fsOptionsString
  108. syn keyword fsOptionsKeywords contained bg fg soft hard intr cto ac tcp udp lock nobg nofg nosoft nohard nointr noposix nocto noac notcp noudp nolock
  109.  
  110. " Options: ntfs
  111. syn match fsOptionsKeywords contained /\%(posix=*\|uni_xlate=\)/ nextgroup=fsOptionsNumber
  112. syn keyword fsOptionsKeywords contained utf8
  113.  
  114. " Options: proc
  115. " -- everything already defined
  116.  
  117. " Options: reiserfs
  118. syn match fsOptionsKeywords contained /hash=/ nextgroup=fsOptionsReiserHash
  119. syn match fsOptionsKeywords contained /resize=/ nextgroup=fsOptionsNumber
  120. syn keyword fsOptionsReiserHash contained rupasov tea r5 detect
  121. syn keyword fsOptionsKeywords contained hashed_relocation noborder nolog notail no_unhashed_relocation replayonly
  122.  
  123. " Options: udf
  124. syn match fsOptionsKeywords contained /\%(anchor\|partition\|lastblock\|fileset\|rootdir\)=/ nextgroup=fsOptionsString
  125. syn keyword fsOptionsKeywords contained unhide undelete strict novrs
  126.  
  127. " Options: ufs
  128. syn match fsOptionsKeywords contained /ufstype=/ nextgroup=fsOptionsUfsType
  129. syn match fsOptionsKeywords contained /onerror=/ nextgroup=fsOptionsUfsError
  130. syn keyword fsOptionsUfsType contained old 44bsd sun sunx86 nextstep openstep
  131. syn match fsOptionsUfsType contained /nextstep-cd/
  132. syn keyword fsOptionsUfsError contained panic lock umount repair
  133.  
  134. " Options: vfat
  135. syn keyword fsOptionsKeywords contained nonumtail posix utf8
  136. syn match fsOptionsKeywords contained /shortname=/ nextgroup=fsOptionsVfatShortname
  137. syn keyword fsOptionsVfatShortname contained lower win95 winnt mixed
  138.  
  139. " Options: xfs
  140. syn match fsOptionsKeywords contained /\%(biosize\|logbufs\|logbsize\|logdev\|rtdev\|sunit\|swidth\)=/ nextgroup=fsOptionsString
  141. syn keyword fsOptionsKeywords contained dmapi xdsm noalign noatime norecovery osyncisdsync quota usrquota uquoenforce grpquota gquoenforce
  142.  
  143. " Frequency / Pass No.
  144. syn cluster fsFreqPassCluster contains=fsFreqPassNumber,fsFreqPassError
  145. syn match fsFreqPassError /\s\+\zs\%(\D.*\|\S.*\|\d\+\s\+[^012]\)\ze/ contained
  146. syn match fsFreqPassNumber /\d\+\s\+[012]\s*/ contained
  147.  
  148. " Groups
  149. syn match fsDevice /^\s*\zs.\{-1,}\s/me=e-1 nextgroup=fsMountPoint contains=@fsDeviceCluster,@fsGeneralCluster
  150. syn match fsMountPoint /\s\+.\{-}\s/me=e-1 nextgroup=fsType contains=@fsMountPointCluster,@fsGeneralCluster contained
  151. syn match fsType /\s\+.\{-}\s/me=e-1 nextgroup=fsOptions contains=@fsTypeCluster,@fsGeneralCluster contained
  152. syn match fsOptions /\s\+.\{-}\s/me=e-1 nextgroup=fsFreqPass contains=@fsOptionsCluster,@fsGeneralCluster contained
  153. syn match fsFreqPass /\s\+.\{-}$/ contains=@fsFreqPassCluster,@fsGeneralCluster contained
  154.  
  155. " Whole line comments
  156. syn match fsCommentLine /^#.*$/
  157.  
  158. if version >= 508 || !exists("did_config_syntax_inits")
  159.     if version < 508
  160.         let did_config_syntax_inits = 1
  161.         command! -nargs=+ HiLink hi link <args>
  162.     else
  163.         command! -nargs=+ HiLink hi def link <args>
  164.     endif
  165.  
  166.     HiLink fsOperator Operator
  167.     HiLink fsComment Comment
  168.     HiLink fsCommentLine Comment
  169.  
  170.     HiLink fsTypeKeyword Type
  171.     HiLink fsDeviceKeyword Identifier
  172.     HiLink fsDeviceLabel String
  173.     HiLink fsFreqPassNumber Number
  174.  
  175.     HiLink fsTypeError Error
  176.     HiLink fsDeviceError Error
  177.     HiLink fsMountPointError Error
  178.     HiLink fsMountPointKeyword Keyword
  179.     HiLink fsFreqPassError Error
  180.  
  181.     HiLink fsOptionsGeneral Type
  182.     HiLink fsOptionsKeywords Keyword
  183.     HiLink fsOptionsNumber Number
  184.     HiLink fsOptionsNumberOctal Number
  185.     HiLink fsOptionsString String
  186.     HiLink fsOptionsSize Number
  187.     HiLink fsOptionsExt2Check String
  188.     HiLink fsOptionsExt2Errors String
  189.     HiLink fsOptionsExt3Journal String
  190.     HiLink fsOptionsExt3Data String
  191.     HiLink fsOptionsFatCheck String
  192.     HiLink fsOptionsConv String
  193.     HiLink fsOptionsFatType Number
  194.     HiLink fsOptionsYesNo String
  195.     HiLink fsOptionsHpfsCase String
  196.     HiLink fsOptionsIsoMap String
  197.     HiLink fsOptionsReiserHash String
  198.     HiLink fsOptionsUfsType String
  199.     HiLink fsOptionsUfsError String
  200.  
  201.     HiLink fsOptionsVfatShortname String
  202.  
  203.     delcommand HiLink
  204. endif
  205.  
  206. let b:current_syntax = "fstab"
  207.  
  208. " vim: ts=8 ft=vim
  209.