nprintz / junos-sublime-pkg

Junos Config Syntax Highlighting for Sublime Text 2/3
29 stars 9 forks source link

Feature request - highlighting for policy names #2

Closed choy11 closed 10 years ago

choy11 commented 10 years ago

Please add highlighting for policy names, it will make them easier to find in some of the less common places. i.e. rib-groups But will also help with policy in routing-instances and other places.

Thanks!!

nprintz commented 10 years ago

I'll add import-policy, instance-export and instance-import as keywords for user-defined arbitrary policy names. This should then highlight the word after those keywords in the same manner as policy names after the keywords policy and policy-statement. It technically shouldn't matter where in the config the policy shows up, (routing-instance, logical-system, etc), as long as it is preceded by one of these keywords, it should be highlighted. Are there any other keywords you can think of that should signify a policy name in addition to the ones that are already used?

screen shot 2014-10-13 at 4 17 18 pm

nprintz commented 10 years ago

I'll also add the rib-groups keyword itself, which is a user-defined name as well. I will also be highlighting routing table names in the next version too.

choy11 commented 10 years ago

vrf-export, vrf-import, all the protocols stanzas under routing-instances, routing-options forwarding-table export. I am sure there are more, but those would be a good start.

nprintz commented 10 years ago

Ah, yup.

I'll add vrf-import, vrf-export, import, and export as keywords as well. I believe this will catch all the protocols such as bgp, msdp, pim, ospf, isis, etc (and export will catch forwarding-table export).

Using help apropos, I also found keep-import, inter-area-prefix-import, inter-area-prefix-export, network-summary-import, network-summary-export, bootstrap-export, and bootstrap-import.

nprintz commented 10 years ago

I've published a new release including these changes, along with others. You should see this the next time you start sublime text. I'm going to go ahead and close this issue, but feel free to reopen if you find more policy keywords.

choy11 commented 10 years ago

set protocols ldp egress-policy