Shows annotations for IPV4 cidr ranges with the number of addresses in the range.
Tooltip provides more detailed information on hover.
Uses the cidr-regex and ip libraries to find ipv4 cidr ranges in open documents and display information about them.
There is a codelens action to copy the information to the clipboard, which can be enabled by adding the following to your settings.json
{
"cidr-ip-range.enableCodeLens": true,
"cidr-ip-range.codeLensFormat": "json"
},
You can alternatively copy the data as it appears in the table by changing the codeLensFormat
to "table"
{
"cidr-ip-range.enableCodeLens": true,
"cidr-ip-range.codeLensFormat": "table"
},
You can enable or disable the inline decorator which shows how many IP addresses are in a range
{
"cidr-ip-range.enableDecorator": false,
},
You can enable or disable strict CIDR notation, which requires the CIDR range to use the first IP address in the range. Enabling this option will highlight invalid ranges
{
"cidr-ip-range.enableStrict": true,
},
Full list of configuration options
{
"cidr-ip-range.enableCodeLens": {
"type": "boolean",
"description": "Enables a CodeLens with an action to copy the CIDR range information to the clipboard",
"default": false
},
"cidr-ip-range.enableDecorator": {
"type": "boolean",
"description": "Enables the inline decorator that shows how many IP addresses are in a range",
"default": true
},
"cidr-ip-range.enableStrict": {
"type": "boolean",
"description": "Requires the CIDR range to use the first IP in the range e.g. 10.82.184.0/22 instead of 10.82.187.0/22",
"default": false
},
"cidr-ip-range.codeLensFormat": {
"type": "string",
"enum": [
"json",
"table"
],
"default": "json",
"description": "Sets which format the CIDR range information will be copied as"
}
}
Support IPV6
Initial release of cidr-ip-range
Added codelens ability to copy data to clipboard, suggested by Thomas Schlesinger
Added copy to clipboard format types (json / table)
Added configuration option to toggle the inline decoration
Issue #1 - Reported by Jake Ginnivan
Fixed configuration options defaults and removed typo in copy to table
Added strict mode, suggested by makeacode