2 " Language: interfaces (/etc/network/interfaces)
3 " Maintaner: François Wendling <frwending@free.fr>
5 " Released under the terms of the GNU/GPL licence v2
13 syn match interfacesComment /^\s*#.*$/ contains=interfacesComment
14 syn keyword interfacesOpta address gateway netmask broadcast metric pointopoint media hwadress mtu hostname leasehours leasetime vendor client bootfile server hwaddr provider frame netnum endpoint local ttl network
15 syn keyword interfacesSpec mapping iface script auto up down pre-up post-down map contained
16 syn keyword interfacesOptb inet inet6 static dhcp loopback bootp ppp wvdial v4tunnel manual
17 "verify xxx.xxx.xxx.xxx && xxx.xxx.xxx.xxx/xx
19 syn match interfacesIP /\(\d\{1,3}.\)\{3}\d\{1,3}\(\/\d\d\)\?/ contains=interfacesIP
21 syn match interfacesMAC /\(\x\x\:\)\{5}\x\x/
22 syn match interfacesIface /iface\s\+\S\+\s/ contains=interfacesSpec
23 syn match interfacesArgz /\(mapping\|auto\)\+.*/ contains=interfacesSpec
24 " All related to scripts
25 syn match interfacesScript /\(script\|pre-up\|up\|post-up\|pre-down\|down\|post-down\)\s\+.*/ contains=interfacesMAC,interfacesIP,interfacesSpec
26 syn match interfacesMap /map\s.*\s\S\+$/ contains=interfacesSpec,interfacesMAC,interfacesIP
28 hi link interfacesComment Comment
29 hi link interfacesOpta Statement
30 hi link interfacesSpec Statement
31 hi link interfacesOptb Type
32 hi link interfacesIP String
33 hi link interfacesMAC String
34 hi link interfacesNames Special
35 hi link interfacesIface Special
36 hi link interfacesArgz Special
37 hi link interfacesScript Define
38 hi link interfacesMap Special
40 let b:current_syntax = "interfaces"