From e64b0448483aefdb76b48fa257adaa5f8223c375 Mon Sep 17 00:00:00 2001 From: momota Date: Thu, 23 Jun 2016 10:51:06 +0900 Subject: [PATCH] [fix]mod regex, add match keywords --- syntax/junos.vim | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/syntax/junos.vim b/syntax/junos.vim index 03f6c27..a41cdc6 100644 --- a/syntax/junos.vim +++ b/syntax/junos.vim @@ -16,16 +16,14 @@ syn keyword junosCond to-zone from-zone match then from to match syn keyword junosLabel system chassis firewall security rule rule-set pool -syn keyword junosKeyword class user link-mode port-mode speed address route nat policy vlan-id -syn keyword junosKeyword source-address destination-address source-port destination-port +syn keyword junosKeyword version server class user link-mode port-mode speed address route nat policy vlan-id syn keyword junosKeyword static filter term routing-instances routing-engine line-card next-hop storm-control syn keyword junosKeyword redundancy-group cluster vrrp-group virtual-router -syn keyword junosKeyword alg log login +syn keyword junosKeyword alg log login node syn match junosKeyword /interfaces\=/ syn match junosKeyword /vlans\=/ syn match junosKeyword /members\=/ syn match junosKeyword /\(security\-\)\?zones\=/ -syn match junosKeyword /protocols\=/ syn match junosKeyword /applications\=/ syn keyword junosProtocol ip ipv6 inet inet6 tcp udp @@ -34,7 +32,8 @@ syn keyword junosProtocol bgp ospf ospf3 rip ripng isis syn keyword junosProtocol igmp igmp-snooping lldp lldp-med mld mld-snooping msdp mstp mvrp mpls vrrp lacp syn keyword junosProtocol stp sflow vstp dot1x msrp msrpc sunrpc icmp ping pim rstp rsvp netconf syn keyword junosProtocol junos-http junos-https junos-ftp junos-ssh junos-icmp-all junos-ntp junos-smtp -syn keyword junosProtocol junos-udp junos-telnet junos-bgp junos-syslog +syn keyword junosProtocol junos-udp junos-telnet junos-bgp junos-syslog junos-rsh +syn keyword junosProtocol junos-nfs junos-nfsd-udp junos-nfsd-tcp syn match junosProtocol /\s802\.3ad\s/ syn match junosProtocol /\s802\.1Q\s/ @@ -43,19 +42,22 @@ syn keyword junosAction any deny permit accept reject discard disable enable syn keyword junosConfigure set delete rename insert request show syn keyword junosConfigure 100m 1g 10g trunk access syn keyword junosConfigure full-duplex automatic auto-negotiation input output +syn keyword junosConfigure prefer -syn keyword junosFunction id host host-name +syn keyword junosFunction groups screen policies flow +syn keyword junosFunction id host host-name priority weight port protocol +syn keyword junosFunction source-address destination-address source-port destination-port syn match junosFunction /[a-z]\+:[-a-z]\+/ syn match junosFunction /unit\s[0-9]\+/ syn match junosFunction /vlan\.[0-9]\+/ syn match junosFunction /node[0-9]\+/ -syn match junosComment "description.*$" -syn match junosComment "\s*#.*$" +syn match junosComment /description.*$/ +syn match junosComment /\s*#.*$/ syn region junosComment contained start='/*' end='*/' -syn match junosString "\"[^"]*\"" -syn match junosVar "\$\<[-_a-zA-Z0-9]*\>" +syn match junosString /\"[^"]*\"/ + syn match junosVar /\d\+/ syn keyword junosInterface lo0