Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 2 | " Language: fstab file |
Bram Moolenaar | e6ae622 | 2013-05-21 21:01:10 +0200 | [diff] [blame] | 3 | " Maintainer: Radu Dineiu <radu.dineiu@gmail.com> |
| 4 | " URL: https://raw.github.com/rid9/vim-fstab/master/fstab.vim |
| 5 | " Last Change: 2013 May 21 |
| 6 | " Version: 1.0 |
Bram Moolenaar | dd2a3cd | 2007-05-05 17:10:09 +0000 | [diff] [blame] | 7 | " |
| 8 | " Credits: |
| 9 | " David Necas (Yeti) <yeti@physics.muni.cz> |
| 10 | " Stefano Zacchiroli <zack@debian.org> |
| 11 | " Georgi Georgiev <chutz@gg3.net> |
Bram Moolenaar | f233048 | 2008-06-24 20:19:36 +0000 | [diff] [blame] | 12 | " James Vega <jamessan@debian.org> |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 13 | " Elias Probst <mail@eliasprobst.eu> |
Bram Moolenaar | e6ae622 | 2013-05-21 21:01:10 +0200 | [diff] [blame] | 14 | |
Bram Moolenaar | dd2a3cd | 2007-05-05 17:10:09 +0000 | [diff] [blame] | 15 | " Options: |
| 16 | " let fstab_unknown_fs_errors = 1 |
| 17 | " highlight unknown filesystems as errors |
Bram Moolenaar | e6ae622 | 2013-05-21 21:01:10 +0200 | [diff] [blame] | 18 | " |
| 19 | " let fstab_unknown_device_errors = 0 |
| 20 | " do not highlight unknown devices as errors |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 21 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 22 | " quit when a syntax file was already loaded |
| 23 | if exists("b:current_syntax") |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 24 | finish |
| 25 | endif |
| 26 | |
Bram Moolenaar | e6ae622 | 2013-05-21 21:01:10 +0200 | [diff] [blame] | 27 | let s:cpo_save = &cpo |
| 28 | set cpo&vim |
| 29 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 30 | " General |
| 31 | syn cluster fsGeneralCluster contains=fsComment |
Bram Moolenaar | e6ae622 | 2013-05-21 21:01:10 +0200 | [diff] [blame] | 32 | syn match fsComment /\s*#.*/ contains=@Spell |
Bram Moolenaar | f233048 | 2008-06-24 20:19:36 +0000 | [diff] [blame] | 33 | syn match fsOperator /[,=:#]/ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 34 | |
| 35 | " Device |
| 36 | syn cluster fsDeviceCluster contains=fsOperator,fsDeviceKeyword,fsDeviceError |
Bram Moolenaar | dd2a3cd | 2007-05-05 17:10:09 +0000 | [diff] [blame] | 37 | syn match fsDeviceError /\%([^a-zA-Z0-9_\/#@:\.-]\|^\w\{-}\ze\W\)/ contained |
Bram Moolenaar | e6ae622 | 2013-05-21 21:01:10 +0200 | [diff] [blame] | 38 | syn keyword fsDeviceKeyword contained none proc linproc tmpfs devpts devtmpfs sysfs usbfs |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 39 | syn keyword fsDeviceKeyword contained LABEL nextgroup=fsDeviceLabel |
Bram Moolenaar | dd2a3cd | 2007-05-05 17:10:09 +0000 | [diff] [blame] | 40 | syn keyword fsDeviceKeyword contained UUID nextgroup=fsDeviceUUID |
Bram Moolenaar | f233048 | 2008-06-24 20:19:36 +0000 | [diff] [blame] | 41 | syn keyword fsDeviceKeyword contained sshfs nextgroup=fsDeviceSshfs |
Bram Moolenaar | dd2a3cd | 2007-05-05 17:10:09 +0000 | [diff] [blame] | 42 | syn match fsDeviceKeyword contained /^[a-zA-Z0-9.\-]\+\ze:/ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 43 | syn match fsDeviceLabel contained /=[^ \t]\+/hs=s+1 contains=fsOperator |
Bram Moolenaar | dd2a3cd | 2007-05-05 17:10:09 +0000 | [diff] [blame] | 44 | syn match fsDeviceUUID contained /=[^ \t]\+/hs=s+1 contains=fsOperator |
Bram Moolenaar | f233048 | 2008-06-24 20:19:36 +0000 | [diff] [blame] | 45 | syn match fsDeviceSshfs contained /#[_=[:alnum:]\.\/+-]\+@[a-z0-9._-]\+\a\{2}:[^ \t]\+/hs=s+1 contains=fsOperator |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 46 | |
| 47 | " Mount Point |
| 48 | syn cluster fsMountPointCluster contains=fsMountPointKeyword,fsMountPointError |
Bram Moolenaar | dd2a3cd | 2007-05-05 17:10:09 +0000 | [diff] [blame] | 49 | syn match fsMountPointError /\%([^ \ta-zA-Z0-9_\/#@\.-]\|\s\+\zs\w\{-}\ze\s\)/ contained |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 50 | syn keyword fsMountPointKeyword contained none swap |
| 51 | |
| 52 | " Type |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 53 | syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown |
| 54 | syn match fsTypeUnknown /\s\+\zs\w\+/ contained |
Bram Moolenaar | e6ae622 | 2013-05-21 21:01:10 +0200 | [diff] [blame] | 55 | syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 cfs cgroup cifs coda configfs cpuset cramfs devfs devpts devtmpfs e2compr efs ext2 ext2fs ext3 ext4 fdesc ffs filecore fuse fuseblk fusectl hfs hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfsd nilfs2 none ntfs null nwfs overlay ovlfs pipefs portal proc procfs pstore ptyfs qnx4 reiserfs ramfs romfs securityfs shm smbfs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xenfs xfs zisofs |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 56 | |
| 57 | " Options |
| 58 | " ------- |
| 59 | " Options: General |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 60 | syn cluster fsOptionsCluster contains=fsOperator,fsOptionsGeneral,fsOptionsKeywords,fsTypeUnknown |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 61 | syn match fsOptionsNumber /\d\+/ |
| 62 | syn match fsOptionsNumberOctal /[0-8]\+/ |
| 63 | syn match fsOptionsString /[a-zA-Z0-9_-]\+/ |
| 64 | syn keyword fsOptionsYesNo yes no |
| 65 | syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck |
| 66 | syn keyword fsOptionsSize 512 1024 2048 |
Bram Moolenaar | dd2a3cd | 2007-05-05 17:10:09 +0000 | [diff] [blame] | 67 | syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand nosuid nosymfollow nouser owner rbind rdonly remount ro rq rw suid suiddir supermount sw sync union update user users xx |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 68 | syn match fsOptionsGeneral /_netdev/ |
| 69 | |
| 70 | " Options: adfs |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 71 | syn match fsOptionsKeywords contained /\<\%([ug]id\|o\%(wn\|th\)mask\)=/ nextgroup=fsOptionsNumber |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 72 | |
| 73 | " Options: affs |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 74 | syn match fsOptionsKeywords contained /\<\%(set[ug]id\|mode\|reserved\)=/ nextgroup=fsOptionsNumber |
| 75 | syn match fsOptionsKeywords contained /\<\%(prefix\|volume\|root\)=/ nextgroup=fsOptionsString |
| 76 | syn match fsOptionsKeywords contained /\<bs=/ nextgroup=fsOptionsSize |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 77 | syn keyword fsOptionsKeywords contained protect usemp verbose |
| 78 | |
Bram Moolenaar | e6ae622 | 2013-05-21 21:01:10 +0200 | [diff] [blame] | 79 | " Options: btrfs |
| 80 | syn match fsOptionsKeywords contained /\<\%(subvol\|subvolid\|subvolrootid\|device\|compress\|compress-force\|fatal_errors\)=/ nextgroup=fsOptionsString |
| 81 | syn match fsOptionsKeywords contained /\<\%(max_inline\|alloc_start\|thread_pool\|metadata_ratio\|check_int_print_mask\)=/ nextgroup=fsOptionsNumber |
| 82 | syn keyword fsOptionsKeywords contained degraded nodatasum nodatacow nobarrier ssd ssd_spread noacl notreelog flushoncommit space_cache nospace_cache clear_cache user_subvol_rm_allowed autodefrag inode_cache enospc_debug recovery check_int check_int_data skip_balance discard |
| 83 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 84 | " Options: cd9660 |
| 85 | syn keyword fsOptionsKeywords contained extatt gens norrip nostrictjoilet |
| 86 | |
| 87 | " Options: devpts |
| 88 | " -- everything already defined |
| 89 | |
| 90 | " Options: ext2 |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 91 | syn match fsOptionsKeywords contained /\<check=*/ nextgroup=@fsOptionsCheckCluster |
| 92 | syn match fsOptionsKeywords contained /\<errors=/ nextgroup=fsOptionsExt2Errors |
| 93 | syn match fsOptionsKeywords contained /\<\%(res[gu]id\|sb\)=/ nextgroup=fsOptionsNumber |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 94 | syn keyword fsOptionsExt2Check contained none normal strict |
| 95 | syn keyword fsOptionsExt2Errors contained continue panic |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 96 | syn match fsOptionsExt2Errors contained /\<remount-ro\>/ |
Bram Moolenaar | e6ae622 | 2013-05-21 21:01:10 +0200 | [diff] [blame] | 97 | syn keyword fsOptionsKeywords contained acl bsddf minixdf debug grpid bsdgroups minixdf nocheck nogrpid oldalloc orlov sysvgroups nouid32 nobh user_xattr nouser_xattr |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 98 | |
| 99 | " Options: ext3 |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 100 | syn match fsOptionsKeywords contained /\<journal=/ nextgroup=fsOptionsExt3Journal |
| 101 | syn match fsOptionsKeywords contained /\<data=/ nextgroup=fsOptionsExt3Data |
| 102 | syn match fsOptionsKeywords contained /\<commit=/ nextgroup=fsOptionsNumber |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 103 | syn keyword fsOptionsExt3Journal contained update inum |
| 104 | syn keyword fsOptionsExt3Data contained journal ordered writeback |
Bram Moolenaar | e6ae622 | 2013-05-21 21:01:10 +0200 | [diff] [blame] | 105 | syn keyword fsOptionsKeywords contained noload user_xattr nouser_xattr acl |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 106 | |
| 107 | " Options: ext4 |
| 108 | syn match fsOptionsKeywords contained /\<journal=/ nextgroup=fsOptionsExt4Journal |
| 109 | syn match fsOptionsKeywords contained /\<data=/ nextgroup=fsOptionsExt4Data |
| 110 | syn match fsOptionsKeywords contained /\<barrier=/ nextgroup=fsOptionsExt4Barrier |
| 111 | syn match fsOptionsKeywords contained /\<journal_dev=/ nextgroup=fsOptionsNumber |
| 112 | syn match fsOptionsKeywords contained /\<resuid=/ nextgroup=fsOptionsNumber |
| 113 | syn match fsOptionsKeywords contained /\<resgid=/ nextgroup=fsOptionsNumber |
| 114 | syn match fsOptionsKeywords contained /\<sb=/ nextgroup=fsOptionsNumber |
| 115 | syn match fsOptionsKeywords contained /\<commit=/ nextgroup=fsOptionsNumber |
| 116 | syn keyword fsOptionsExt4Journal contained update inum |
| 117 | syn keyword fsOptionsExt4Data contained journal ordered writeback |
| 118 | syn match fsOptionsExt4Barrier /[0-1]/ |
| 119 | syn keyword fsOptionsKeywords contained noload extents orlov oldalloc user_xattr nouser_xattr acl noacl reservation noreservation bsddf minixdf check=none nocheck debug grpid nogroupid sysvgroups bsdgroups quota noquota grpquota usrquota bh nobh |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 120 | |
| 121 | " Options: fat |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 122 | syn match fsOptionsKeywords contained /\<blocksize=/ nextgroup=fsOptionsSize |
| 123 | syn match fsOptionsKeywords contained /\<\%([dfu]mask\|codepage\)=/ nextgroup=fsOptionsNumberOctal |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 124 | syn match fsOptionsKeywords contained /\%(cvf_\%(format\|option\)\|iocharset\)=/ nextgroup=fsOptionsString |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 125 | syn match fsOptionsKeywords contained /\<check=/ nextgroup=@fsOptionsCheckCluster |
| 126 | syn match fsOptionsKeywords contained /\<conv=*/ nextgroup=fsOptionsConv |
| 127 | syn match fsOptionsKeywords contained /\<fat=/ nextgroup=fsOptionsFatType |
| 128 | syn match fsOptionsKeywords contained /\<dotsOK=/ nextgroup=fsOptionsYesNo |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 129 | syn keyword fsOptionsFatCheck contained r n s relaxed normal strict |
| 130 | syn keyword fsOptionsConv contained b t a binary text auto |
| 131 | syn keyword fsOptionsFatType contained 12 16 32 |
| 132 | syn keyword fsOptionsKeywords contained quiet sys_immutable showexec dots nodots |
| 133 | |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 134 | " Options: hfs |
| 135 | syn match fsOptionsKeywords contained /\<\%(creator|type\)=/ nextgroup=fsOptionsString |
| 136 | syn match fsOptionsKeywords contained /\<\%(dir\|file\|\)_umask=/ nextgroup=fsOptionsNumberOctal |
| 137 | syn match fsOptionsKeywords contained /\<\%(session\|part\)=/ nextgroup=fsOptionsNumber |
| 138 | |
Bram Moolenaar | dd2a3cd | 2007-05-05 17:10:09 +0000 | [diff] [blame] | 139 | " Options: ffs |
| 140 | syn keyword fsOptionsKeyWords contained softdep |
| 141 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 142 | " Options: hpfs |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 143 | syn match fsOptionsKeywords contained /\<case=/ nextgroup=fsOptionsHpfsCase |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 144 | syn keyword fsOptionsHpfsCase contained lower asis |
| 145 | |
| 146 | " Options: iso9660 |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 147 | syn match fsOptionsKeywords contained /\<map=/ nextgroup=fsOptionsIsoMap |
| 148 | syn match fsOptionsKeywords contained /\<block=/ nextgroup=fsOptionsSize |
| 149 | syn match fsOptionsKeywords contained /\<\%(session\|sbsector\)=/ nextgroup=fsOptionsNumber |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 150 | syn keyword fsOptionsIsoMap contained n o a normal off acorn |
| 151 | syn keyword fsOptionsKeywords contained norock nojoilet unhide cruft |
| 152 | syn keyword fsOptionsConv contained m mtext |
| 153 | |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 154 | " Options: jfs |
| 155 | syn keyword fsOptionsKeywords nointegrity integrity |
| 156 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 157 | " Options: nfs |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 158 | syn match fsOptionsKeywords contained /\<\%(rsize\|wsize\|timeo\|retrans\|acregmin\|acregmax\|acdirmin\|acdirmax\|actimeo\|retry\|port\|mountport\|mounthost\|mountprog\|mountvers\|nfsprog\|nfsvers\|namelen\)=/ nextgroup=fsOptionsString |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 159 | 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 |
| 160 | |
| 161 | " Options: ntfs |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 162 | syn match fsOptionsKeywords contained /\<\%(posix=*\|uni_xlate=\)/ nextgroup=fsOptionsNumber |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 163 | syn keyword fsOptionsKeywords contained utf8 |
| 164 | |
| 165 | " Options: proc |
| 166 | " -- everything already defined |
| 167 | |
| 168 | " Options: reiserfs |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 169 | syn match fsOptionsKeywords contained /\<hash=/ nextgroup=fsOptionsReiserHash |
| 170 | syn match fsOptionsKeywords contained /\<resize=/ nextgroup=fsOptionsNumber |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 171 | syn keyword fsOptionsReiserHash contained rupasov tea r5 detect |
| 172 | syn keyword fsOptionsKeywords contained hashed_relocation noborder nolog notail no_unhashed_relocation replayonly |
| 173 | |
Bram Moolenaar | f233048 | 2008-06-24 20:19:36 +0000 | [diff] [blame] | 174 | " Options: sshfs |
| 175 | syn match fsOptionsKeywords contained /\<\%(BatchMode\|ChallengeResponseAuthentication\|CheckHostIP\|ClearAllForwardings\|Compression\|EnableSSHKeysign\|ForwardAgent\|ForwardX11\|ForwardX11Trusted\|GatewayPorts\|GSSAPIAuthentication\|GSSAPIDelegateCredentials\|HashKnownHosts\|HostbasedAuthentication\|IdentitiesOnly\|NoHostAuthenticationForLocalhost\|PasswordAuthentication\|PubkeyAuthentication\|RhostsRSAAuthentication\|RSAAuthentication\|TCPKeepAlive\|UsePrivilegedPort\|cache\)=/ nextgroup=fsOptionsYesNo |
| 176 | syn match fsOptionsKeywords contained /\<\%(ControlMaster\|StrictHostKeyChecking\|VerifyHostKeyDNS\)=/ nextgroup=fsOptionsSshYesNoAsk |
| 177 | syn match fsOptionsKeywords contained /\<\%(AddressFamily\|BindAddress\|Cipher\|Ciphers\|ControlPath\|DynamicForward\|EscapeChar\|GlobalKnownHostsFile\|HostKeyAlgorithms\|HostKeyAlias\|HostName\|IdentityFile\|KbdInteractiveDevices\|LocalForward\|LogLevel\|MACs\|PreferredAuthentications\|Protocol\|ProxyCommand\|RemoteForward\|RhostsAuthentication\|SendEnv\|SmartcardDevice\|User\|UserKnownHostsFile\|XAuthLocation\|comment\|workaround\|idmap\|ssh_command\|sftp_server\|fsname\)=/ nextgroup=fsOptionsString |
| 178 | syn match fsOptionsKeywords contained /\<\%(CompressionLevel\|ConnectionAttempts\|ConnectTimeout\|NumberOfPasswordPrompts\|Port\|ServerAliveCountMax\|ServerAliveInterval\|cache_timeout\|cache_X_timeout\|ssh_protocol\|directport\|max_read\|umask\|uid\|gid\|entry_timeout\|negative_timeout\|attr_timeout\)=/ nextgroup=fsOptionsNumber |
| 179 | syn keyword fsOptionsKeywords contained reconnect sshfs_sync no_readahead sshfs_debug transform_symlinks allow_other allow_root nonempty default_permissions large_read hard_remove use_ino readdir_ino direct_io kernel_cache |
| 180 | syn keyword fsOptionsSshYesNoAsk contained yes no ask |
| 181 | |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 182 | " Options: subfs |
| 183 | syn match fsOptionsKeywords contained /\<fs=/ nextgroup=fsOptionsString |
| 184 | syn keyword fsOptionsKeywords contained procuid |
| 185 | |
| 186 | " Options: swap |
| 187 | syn match fsOptionsKeywords contained /\<pri=/ nextgroup=fsOptionsNumber |
| 188 | |
| 189 | " Options: tmpfs |
| 190 | syn match fsOptionsKeywords contained /\<nr_\%(blocks\|inodes\)=/ nextgroup=fsOptionsNumber |
| 191 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 192 | " Options: udf |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 193 | syn match fsOptionsKeywords contained /\<\%(anchor\|partition\|lastblock\|fileset\|rootdir\)=/ nextgroup=fsOptionsString |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 194 | syn keyword fsOptionsKeywords contained unhide undelete strict novrs |
| 195 | |
| 196 | " Options: ufs |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 197 | syn match fsOptionsKeywords contained /\<ufstype=/ nextgroup=fsOptionsUfsType |
| 198 | syn match fsOptionsKeywords contained /\<onerror=/ nextgroup=fsOptionsUfsError |
| 199 | syn keyword fsOptionsUfsType contained old hp 44bsd sun sunx86 nextstep openstep |
| 200 | syn match fsOptionsUfsType contained /\<nextstep-cd\>/ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 201 | syn keyword fsOptionsUfsError contained panic lock umount repair |
| 202 | |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 203 | " Options: usbfs |
| 204 | syn match fsOptionsKeywords contained /\<\%(dev\|bus\|list\)\%(id\|gid\)=/ nextgroup=fsOptionsNumber |
| 205 | syn match fsOptionsKeywords contained /\<\%(dev\|bus\|list\)mode=/ nextgroup=fsOptionsNumberOctal |
| 206 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 207 | " Options: vfat |
| 208 | syn keyword fsOptionsKeywords contained nonumtail posix utf8 |
| 209 | syn match fsOptionsKeywords contained /shortname=/ nextgroup=fsOptionsVfatShortname |
| 210 | syn keyword fsOptionsVfatShortname contained lower win95 winnt mixed |
| 211 | |
| 212 | " Options: xfs |
| 213 | syn match fsOptionsKeywords contained /\%(biosize\|logbufs\|logbsize\|logdev\|rtdev\|sunit\|swidth\)=/ nextgroup=fsOptionsString |
Bram Moolenaar | b21e584 | 2006-04-16 18:30:08 +0000 | [diff] [blame] | 214 | syn keyword fsOptionsKeywords contained dmapi xdsm noalign noatime noquota norecovery osyncisdsync quota usrquota uqnoenforce grpquota gqnoenforce |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 215 | |
| 216 | " Frequency / Pass No. |
| 217 | syn cluster fsFreqPassCluster contains=fsFreqPassNumber,fsFreqPassError |
| 218 | syn match fsFreqPassError /\s\+\zs\%(\D.*\|\S.*\|\d\+\s\+[^012]\)\ze/ contained |
| 219 | syn match fsFreqPassNumber /\d\+\s\+[012]\s*/ contained |
| 220 | |
| 221 | " Groups |
| 222 | syn match fsDevice /^\s*\zs.\{-1,}\s/me=e-1 nextgroup=fsMountPoint contains=@fsDeviceCluster,@fsGeneralCluster |
| 223 | syn match fsMountPoint /\s\+.\{-}\s/me=e-1 nextgroup=fsType contains=@fsMountPointCluster,@fsGeneralCluster contained |
| 224 | syn match fsType /\s\+.\{-}\s/me=e-1 nextgroup=fsOptions contains=@fsTypeCluster,@fsGeneralCluster contained |
| 225 | syn match fsOptions /\s\+.\{-}\s/me=e-1 nextgroup=fsFreqPass contains=@fsOptionsCluster,@fsGeneralCluster contained |
| 226 | syn match fsFreqPass /\s\+.\{-}$/ contains=@fsFreqPassCluster,@fsGeneralCluster contained |
| 227 | |
| 228 | " Whole line comments |
Bram Moolenaar | e6ae622 | 2013-05-21 21:01:10 +0200 | [diff] [blame] | 229 | syn match fsCommentLine /^#.*$/ contains=@Spell |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 230 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 231 | command! -nargs=+ HiLink hi def link <args> |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 232 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 233 | HiLink fsOperator Operator |
| 234 | HiLink fsComment Comment |
| 235 | HiLink fsCommentLine Comment |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 236 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 237 | HiLink fsTypeKeyword Type |
| 238 | HiLink fsDeviceKeyword Identifier |
| 239 | HiLink fsDeviceLabel String |
| 240 | HiLink fsDeviceUUID String |
| 241 | HiLink fsDeviceSshfs String |
| 242 | HiLink fsFreqPassNumber Number |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 243 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 244 | if exists('fstab_unknown_fs_errors') && fstab_unknown_fs_errors == 1 |
| 245 | HiLink fsTypeUnknown Error |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 246 | endif |
| 247 | |
Bram Moolenaar | 89bcfda | 2016-08-30 23:26:57 +0200 | [diff] [blame] | 248 | if !exists('fstab_unknown_device_errors') || fstab_unknown_device_errors == 1 |
| 249 | HiLink fsDeviceError Error |
| 250 | endif |
| 251 | |
| 252 | HiLink fsMountPointError Error |
| 253 | HiLink fsMountPointKeyword Keyword |
| 254 | HiLink fsFreqPassError Error |
| 255 | |
| 256 | HiLink fsOptionsGeneral Type |
| 257 | HiLink fsOptionsKeywords Keyword |
| 258 | HiLink fsOptionsNumber Number |
| 259 | HiLink fsOptionsNumberOctal Number |
| 260 | HiLink fsOptionsString String |
| 261 | HiLink fsOptionsSize Number |
| 262 | HiLink fsOptionsExt2Check String |
| 263 | HiLink fsOptionsExt2Errors String |
| 264 | HiLink fsOptionsExt3Journal String |
| 265 | HiLink fsOptionsExt3Data String |
| 266 | HiLink fsOptionsExt4Journal String |
| 267 | HiLink fsOptionsExt4Data String |
| 268 | HiLink fsOptionsExt4Barrier Number |
| 269 | HiLink fsOptionsFatCheck String |
| 270 | HiLink fsOptionsConv String |
| 271 | HiLink fsOptionsFatType Number |
| 272 | HiLink fsOptionsYesNo String |
| 273 | HiLink fsOptionsHpfsCase String |
| 274 | HiLink fsOptionsIsoMap String |
| 275 | HiLink fsOptionsReiserHash String |
| 276 | HiLink fsOptionsSshYesNoAsk String |
| 277 | HiLink fsOptionsUfsType String |
| 278 | HiLink fsOptionsUfsError String |
| 279 | |
| 280 | HiLink fsOptionsVfatShortname String |
| 281 | |
| 282 | delcommand HiLink |
| 283 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 284 | let b:current_syntax = "fstab" |
| 285 | |
Bram Moolenaar | e6ae622 | 2013-05-21 21:01:10 +0200 | [diff] [blame] | 286 | let &cpo = s:cpo_save |
| 287 | unlet s:cpo_save |
| 288 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 289 | " vim: ts=8 ft=vim |