GNOME Bugzilla – Bug 508061
Language file for Cisco IOS routers and switches feature request
Last modified: 2009-12-29 14:49:31 UTC
This is a language file I created to help with editing Cisco switch and router configs. I have a different language file for Cisco PIX/ASA firewalls. I'll submit it after this one. Would be nice to have these included in future releases of GTKSourceView. <?xml version="1.0" encoding="UTF-8"?> <!-- Author: Simon Raiford <sraiford@gmail.com> This is a GTKSourceView language template for Cisco ASA and PIX firewalls. Feel free to update or redistribute as you deem fit. --> <language id="cisco-ios" _name="Cisco IOS" version="2.0" _section="Cisco"> <metadata> <property name="mimetypes">text/plain</property> <property name="globs">*.cfg</property> <property name="comment-start">!</property> </metadata> <styles> <style id="comment" _name="Comment" map-to="def:comment"/> <style id="identifier" _name="Interface" map-to="def:identifier"/> <style id="list" _name="Access List" map-to="def:preprocessor"/> <style id="number" _name="Number" map-to="def:preprocessor"/> </styles> <definitions> <context id="comment" style-ref="comment" end-at-line-end="true"> <start>!</start> </context> <context id="description" style-ref="comment" end-at-line-end="true"> <start>description</start> </context> <context id="hostname" end-at-line-end="true" extend-parent="false" style-ref="identifier"> <start>hostname</start> </context> <context id="interface" end-at-line-end="true" extend-parent="false" style-ref="identifier"> <start>interface</start> </context> <context id="policy-map" end-at-line-end="true" extend-parent="false" style-ref="identifier"> <start>policy-map</start> </context> <context id="class-map" end-at-line-end="true" extend-parent="false" style-ref="identifier"> <start>class-map</start> </context> <context id="controller" end-at-line-end="true" extend-parent="false" style-ref="identifier"> <start>controller</start> </context> <context id="linevty" end-at-line-end="true" extend-parent="false" style-ref="identifier"> <start>line vty</start> </context> <context id="linecon" end-at-line-end="true" extend-parent="false" style-ref="identifier"> <start>line con</start> </context> <context id="lineaux" end-at-line-end="true" extend-parent="false" style-ref="identifier"> <start>line aux</start> </context> <context id="lists" style-ref="list"> <keyword>access-list</keyword> <keyword>ip route</keyword> <keyword>ip nat</keyword> </context> <context id="routers" style-ref="identifier"> <keyword>router rip</keyword> <keyword>router eigrp</keyword> <keyword>router igrp</keyword> <keyword>router ospf</keyword> <keyword>router bgp</keyword> </context> <context id="number" style-ref="number"> <match>(\b[0-9]+(\.[0-9]+)?|\.[0-9]+)([Ee][\+-]?[0-9]+)?\b</match> </context> <context id="cisco-ios"> <include> <context ref="comment"/> <context ref="description"/> <context ref="hostname"/> <context ref="interface"/> <context ref="controller"/> <context ref="linevty"/> <context ref="linecon"/> <context ref="lineaux"/> <context ref="policy-map"/> <context ref="class-map"/> <context ref="lists"/> <context ref="routers"/> <context ref="number"/> </include> </context> </definitions> </language>
sorry for not replying it sooner and thanks for taking the time to create these files... However .cfg is a very common extension for config file and including this lang file will make result in bad highlighting of other config files for many users. Given that they are very specic to a niche of usres, I think they are better suited to be distributed separately.