Is there a way?
I'd like to be able to highlight things like "ip access-list" in Cisco configs, and to be able to treat "ip access-list extended" different from "ip access-list standard" for instance.
I created a syntax and a color file, and it worked for single-word keywords and just ignored any line in my keyword list that had a space in it. Is there a way to get this to work?
multi-word keywords
Re: multi-word keywords
No official reply, but I'm going to say, "No",
because SPACE characters are delimiters. (in the absolute sense)
Afaik, you cannot include them as part of a keyword.
Someone will correct me if I'm wrong.
I can see where that might be nice in some specifications, though.
Just like I could use some stuff to support RTF, which is a special kind
of specification that is different from more standard programming-like specs.
If they could support SPACE characters somehow, that would be nice.
You would (maybe) have to have some way to specify them, though, with a special
"this is a SPACE" character, which you should be able to specify based on
what is available in the spec in question.
So you might use a plus sign (+), or an underscore (_), or whatever you
are not using otherwise, which would then have to be "converted" into
a SPACE character internally.
So in your example, they would be "ip+access-list+extended" and "ip+access-list+standard",
with a plus sign as the SPACE specifier.
because SPACE characters are delimiters. (in the absolute sense)
Afaik, you cannot include them as part of a keyword.
Someone will correct me if I'm wrong.
I can see where that might be nice in some specifications, though.
Just like I could use some stuff to support RTF, which is a special kind
of specification that is different from more standard programming-like specs.
If they could support SPACE characters somehow, that would be nice.
You would (maybe) have to have some way to specify them, though, with a special
"this is a SPACE" character, which you should be able to specify based on
what is available in the spec in question.
So you might use a plus sign (+), or an underscore (_), or whatever you
are not using otherwise, which would then have to be "converted" into
a SPACE character internally.
So in your example, they would be "ip+access-list+extended" and "ip+access-list+standard",
with a plus sign as the SPACE specifier.
RJTE version 16.16 (actual) - 64-bit
Win 10 Pro 64-bit 8 GB RAM Intel Core i7-6700 3.40 GHz SCSI Hard Drive 1 TB
Note: The signature is dynamic, not static,
so it may not show the correct version above
that was in use at the time of the post.
Win 10 Pro 64-bit 8 GB RAM Intel Core i7-6700 3.40 GHz SCSI Hard Drive 1 TB
Note: The signature is dynamic, not static,
so it may not show the correct version above
that was in use at the time of the post.
- Rickard Johansson
- Site Admin
- Posts: 6629
- Joined: 19 Jul 2006 14:29
Re: multi-word keywords
The official reply is "No". But it seems to me you should be able to make it fairly readable anyway using different colors for keywords, e.g.
ip access-list standard
ip access-list extended
ip access-list standard
ip access-list extended