{"id":25077904,"url":"https://github.com/egberts/vim-syntax-bind-named","last_synced_at":"2025-04-15T03:06:05.410Z","repository":{"id":46810536,"uuid":"251102517","full_name":"egberts/vim-syntax-bind-named","owner":"egberts","description":"Vim/NeoVIM syntax for ISC Bind named.conf configuration file.","archived":false,"fork":false,"pushed_at":"2024-08-30T16:33:04.000Z","size":225,"stargazers_count":23,"open_issues_count":5,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T03:05:59.490Z","etag":null,"topics":["bind","bind9","bind9-configuration","isc-bind-server","named","neovim","neovim-conf","neovim-config","neovim-configuration","neovim-plugin","neovim-plugins","vim","vim-plugin","vim-syntax","vim8-plugin","vim9-plugin"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/egberts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-29T18:23:22.000Z","updated_at":"2025-04-09T02:02:15.000Z","dependencies_parsed_at":"2022-09-24T17:44:37.497Z","dependency_job_id":null,"html_url":"https://github.com/egberts/vim-syntax-bind-named","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egberts%2Fvim-syntax-bind-named","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egberts%2Fvim-syntax-bind-named/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egberts%2Fvim-syntax-bind-named/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egberts%2Fvim-syntax-bind-named/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egberts","download_url":"https://codeload.github.com/egberts/vim-syntax-bind-named/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997086,"owners_count":21195799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bind","bind9","bind9-configuration","isc-bind-server","named","neovim","neovim-conf","neovim-config","neovim-configuration","neovim-plugin","neovim-plugins","vim","vim-plugin","vim-syntax","vim8-plugin","vim9-plugin"],"created_at":"2025-02-07T02:40:06.057Z","updated_at":"2025-04-15T03:06:05.394Z","avatar_url":"https://github.com/egberts.png","language":"Vim Script","readme":"vim-syntax-bind-named\n=====================\n\nHighlights your Bind9 `named.conf` (and zones and its include files) in\nvim editor session.\n\nUses 4-bit (16-color) Vim color scheme.  Supports light/dark theme too.\n\nTo quickly see nearly all permutation of Bind9 named.conf configuration settings\n, run:\n\n   vim test/example-9.16-named.conf\n\nThis is where most of my animated GIF came from.\n\nThis project aims to replace the stock Vim syntax highlighting for ISC Bind\n(`named.vim`), by updating it to recognize the new RRs that came out in\nthe last few decade and also to highlight more clauses/statements/keywords that ISC Bind9 has incorporated as of late.\n\n![Example](https://raw.githubusercontent.com/egberts/gist/master/vim-syntax-bind-named-front-page.png \"Example\")\n\nAs comment lines throughout this `bind-named.vim` syntax file, I incorporate\nnearly all the revised psuedo-BNF syntax for every `named.conf` statement\nkeywords encountered.  These psuedo-BNF syntax may (often) not match the\nofficial ISC Bind documentation because its C source code\ntakes final precedence here.\n\nFEATURES\n--------\n\nOctober 16, 2021\n* v9.16 supported\n* many filespec arguments are now forced double-quote syntax.\n\nOriginal release\n* new `named.conf` keywords supported\n* All 3 comment styles supported: C++, C, bash.\n* IPv6 syntax checking\n * link-local IPv6 addresses with zone numeric and name index\n * IPv4-mapped IPv6 addresses and IPv4-translated addresses\n * IPv4-Embedded IPv6 Address\n* a comprehensive test named.conf file for later tweaking of this syntax file.\n* Bold-Highlighting TODO, FIXME, and XXX in comment lines.\n* Supports many include statements for large enterprise (or whitelabs).\n* New filetype detections\n * `rndc.conf` Filetype detection\n * supports `rndc.key`\n * Still supports named.conf\n* Filetype detection, both expanded (and constrained)\n * Constrained to `named-*.conf` from `named*.conf`\n * Constrained to `named_*.conf` from `named*.conf`\n * Constrained to `named.*.conf` from `named*.conf`\n * Expanded to `*-named.conf`\n * Expanded to `*_named.conf`\n * Expanded to `*.named.conf`\n * Expanded to `rndc_*.conf`\n * Expanded to `rndc-*.conf`\n * Expanded to `rndc.*.conf`\n * Expanded to `*_rndc.conf`\n * Expanded to `*-rndc.conf`\n * Expanded to `*.rndc.conf`\n* support for Array-type ACL names.\n\nFiletype Constraints/Expansion\n------------------------------\nThe `rndc.conf` is now supported (along with its filename variants, as long as\nas the filename portion begins with `rndcX` or ends with `Xrndc` and the letter\nX signifies a period, an underscore, or a dash/minus symbol.\n\nThere's a namedXXXXX.conf out there being used by a database so I figured\nwe constrained it a bit with a dash, an underscore, or a period symbol.\n\nIn my huge internal whitelab bastion server, I run two separate named daemon\nand its configuration files, they all get included into their respective\n`named-XXXX.conf`:\n\n    /etc/bind/named-public.conf\n    /etc/bind/public/acl-named.conf\n    /etc/bind/public/channels-named.conf\n    /etc/bind/public/controls-named.conf\n    /etc/bind/public/dnssec-keys-named.conf\n    /etc/bind/public/masters-named.conf\n    /etc/bind/public/options-named.conf\n    /etc/bind/public/servers-named.conf\n    /etc/bind/public/statistics-named.conf\n    /etc/bind/public/view.red\n    /etc/bind/rndc-public.conf\n\n    /etc/bind/named-internal.conf\n    /etc/bind/internal/options-named.conf\n    /etc/bind/internal/acl-named.conf\n    /etc/bind/internal/channels-named.conf\n    /etc/bind/internal/controls-named.conf\n    /etc/bind/internal/masters-named.conf\n    /etc/bind/internal/view.red\n    /etc/bind/internal/view.dmz\n    /etc/bind/internal/view.yellow\n    /etc/bind/internal/view.green\n    /etc/bind/rndc-internal.conf\n\nArray-Type ACL Names\n--------------------\nImagine my surprise in the current Bind version that ACL names can\nsupport some form of Python/C/C++ language array naming convention.\n\nYeah, ACL names like:\n```named\nacl my_firewall[red][zoom] { acl_conference_rooms; };\nacl my_firewall[red][facetime] { acl_conference_rooms; };\nacl my_firewall[red][signal] { acl_conference_rooms; };\n```\nPretty cool, uh?\n\n\nIPv6 Patterns Supported\n-----------------------\nThe following patterns for IPv6 addresses are supported:\n\n * 1:2:3:4:5:6:7:8\n * 1::  1:2:3:4:5:6:7::\n * 1::8  1:2:3:4:5:6::8  1:2:3:4:5:6::8\n * 1::7:8  1:2:3:4:5::7:8  1:2:3:4:5::8\n * 1::6:7:8  1:2:3:4::6:7:8  1:2:3:4::8\n * 1::5:6:7:8  1:2:3::5:6:7:8  1:2:3::8\n * 1::4:5:6:7:8  1:2::4:5:6:7:8  1:2::8\n * 1::3:4:5:6:7:8  1::3:4:5:6:7:8  1::8\n * ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8 ::8  ::\n * fe80::7:8%eth0  fe80::7:8%1\n * ::255.255.255.255  ::ffff:255.255.255.255  ::ffff:0:255.255.255.255\n * 2001:db8:3:4::192.0.2.33  64:ff9b::192.0.2.33\n\nPLANS\n-----\n\nI plan to:\n\n* replace the stock Vim `bindzone.vim`, but that is something that I\n  would welcome anyone to submit ... easily.\n  Instead, I'm focused on doing this hard problem of creating these\n  syntaxes for `bind-named.vim` (Bind named configuration file).\n\n* make this work steadily across ALL versions of Bind, but in\n  starting with the current v9.16 and then OUTWARD toward v4 and\n  v10: I managed to do this mostly.\n\n* NOT to make a Vim bundle zip file (for remote upgrading/downloading):\n  I work offline and my whitelab is offline, so someone else is more than\n  welcome to do the bunzip'ing.\n\n* make the FINAL CALL here for this syntax development using its C source\n  code.  Mistakes will be made: I'm human too.  ISC Bind9 documentation\n  project is not something to rely on when devising this VIM syntax for\n  its named configuration file.\n  I do have ALL released (and some minor) versions of Bind4, Bind8,\n  Bind9, and Bind10 documentation as well as its source code.\n\nI maintain those lifetime of keywords for `named.conf` and its many\ncharacteristics into my Pythonized ISC Bind keyword dictionary maintained over\nat [egberts' repo at Github](https://github.com/egberts/bind9_parser/blob/master/examples/rough-draft/namedconfglobal.py).  \nSome Python database characteristics for each keywords are:\n\n* statement occurance count\n* occurs multiple times\n* default value\n* validity of value methods\n* found-within which other statement\n* multi-line-ordering ID\n* user-defined indices\n* top-level statement flag\n* output ordering ID\n* introduced in which version\n* obsoleted by which version\n* keyword topic\n* server-type\n* required statement flag\n* subordering matter flag\n* Python dictionary indice by name\n\n\nBug Reporting\n-------------\nIf you have any issues with this syntax file, see if you can:\n\n* pay attention to the closing semicolon and ensure that it is highlighted as soft or light green.\n  If the semicolon is dark-cyan, then that is the point of syntax failure.\n\n* keep narrowing down the offending line until it stopped offending, hopefully\n  it is just to just one (or few) lines.  No need to expose your entire `named.conf`\n  Don't forget to change all IP addresses (unless that breaks too) for\n  your privacy sake.\n\n* post/file the offending line over at my [Github issue](https://github.com/egberts/vim-syntax-bind-named/issues). \n\n* detail the wrong highlight and state what you think is to be its\n  correct highlight, if applicable.\n\n\nDebugging Vim Syntax\n--------------------\nIf you are bold enough to try your hand on debugging Vim syntax file,\nsee my [DEBUG.md](https://github.com/egberts/vim-syntax-bind-named/blob/master/DEBUG.md) on how to debug a Vim syntax file.\n\nInstall\n-------\nSee [INSTALL.md](https://github.com/egberts/vim-syntax-bind-named/blob/master/INSTALL.md) on how to install this Vim syntax to your local Vim settings.\n\nTo Vim Developers\n-----------------\nNote to Vim developers:  During the prototyping of my IPv6 address\nsyntax matching, I noticed that vim 8.1 can only support a maximum\nof 9 groupings of parenthesis, even if I used the \"\\%( ... \\)\"\nnotation (instead of \"\\( ...\\)\").\n\nAs a result of this Vim limitation, I've had to\nduplicate IPv6 match patterns through this syntax file to get around\nthis vim 8.1 limitation.  But it works and faster so.\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegberts%2Fvim-syntax-bind-named","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegberts%2Fvim-syntax-bind-named","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegberts%2Fvim-syntax-bind-named/lists"}