Hello Everyone,
I am new to Sublime so please excuse my ignorance and very much appropriate any help provided. I am a IT / Network Engineer and for years I used NotePad++ to do coding and viewing for my Cisco equipment with keywords I selected to be highlighted in different colors. After playing with Sublime, I am wanting to use it more and more. I downloaded the Package Cisco Syntax for this wonderful App, but it is not highlighting all the keywords I would like. The base is nice, but I would like to add to it. This is where I need a little help. I am not much of a Programmer in the sense of Coding Languages. Bash is the most used while currently working to learn Python.
With NotePad++ you can create and define a language, create keyword lists and assign a color to them. Examples screen shots below.
The Cisco package is in text which I am currently not understanding how it calls out and works. I have placed the full code below but my current questions are:
What is the name support.function.cisco doing or calling out? Where is this function and how does it create the highlighted color?
{ “match”: “access-list”,
“name”: “support.function.cisco”
},
Same question here.
{ “match”: “tunnel-group”,
“name”: “support.class.cisco”
},
!-- Complete File Name: Cisco Definitions.json-tmLanguage
{
“name”: “Cisco”,
“scopeName”: “text.cisco”,
“fileTypes”: [“cfg”,“txt”],
“patterns”: [
{ "match": "^\\s*no ",
"name": "invalid.illegal.cisco"
},
{ "match": "access-list",
"name": "support.function.cisco"
},
{ "match": "crypto ",
"name": "string.unquoted.cisco"
},
{ "match": "any",
"name": "string.unquoted.cisco"
},
{ "match": "deny ",
"name": "support.constant.cisco"
},
{ "match": "permit ",
"name": "constant.character.escape.cisco"
},
{ "match": "object-group",
"name": "markup.list.cisco"
},
{ "match": "object",
"name": "markup.list.cisco"
},
{ "match": "host",
"name": "markup.list.cisco"
},
{ "match": "^[\\s]*!(.*)",
"name": "comment.cisco"
},
{ "match": "static",
"name": "constant.numeric.cisco"
},
{ "match": "tunnel-group",
"name": "support.class.cisco"
},
{ "match": "crypto",
"name": "support.class.cisco"
},
{ "match": "\\d+\\.\\d+\\.\\d+\\.\\d+(/\\d{1,2})?",
"name": "constant.numeric.cisco"
},
{ "match": "[0-9a-fA-F]{0,4}:([0-9a-fA-F]{0,4}:)+[0-9a-fA-F]{0,4}(/\\d{1,3})?",
"name": "constant.numeric.cisco"
}
],
"uuid": "f3ba50f0-2bad-48b7-9509-f6d72e353ddb"
}
Thank you for any help sent my way