Skip to content

Commit 0e8f595

Browse files
author
steve
committed
Support the class for 'view' and 'zone'. Highlight those as identifier.
Was brought to my attention when CHAOS and bind.version didn't work.
1 parent 9464962 commit 0e8f595

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

syntax/bind-named.vim

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ hi link namedHL_Hexidecimal namedHL_Number
160160
hi link namedHL_Wildcard namedHL_Builtin
161161
hi link namedHL_Base64 namedHL_Identifier " RFC 3548
162162
hi link namedHL_ACLName namedHL_Identifier
163+
hi link namedHL_ClassName namedHL_Identifier
163164
hi link namedHL_Filespec namedHL_Identifier
164165
hi link namedHL_KeyName namedHL_Identifier
165166
hi link namedHL_MasterName namedHL_Identifier
@@ -6038,12 +6039,22 @@ syn region namedStmt_ViewSection contained start=+{+ end=+}+
60386039
\ namedParenError
60396040

60406041
" charset_view_name_base = alphanums + '_-.+~@$%^&*()=[]\\|:<>`?' # no semicolon nor curly braces allowed
6042+
"
6043+
hi link namedStmt_ViewClass namedHL_ClassName
6044+
syn match namedStmt_ViewClass contained
6045+
\ /\<\c\%(CHAOS\)\|\%(HESIOD\)\|\%(IN\)\|\%(CH\)\|\%(HS\)\>/
6046+
\ skipwhite skipnl skipempty
6047+
\ nextgroup=
6048+
\ namedStmt_ViewSection,
6049+
\ namedInclude,
6050+
\ namedComment
60416051
hi link namedStmt_ViewNameIdentifier namedHL_ViewName
60426052
syn match namedStmt_ViewNameIdentifier contained /\S\{1,63}/
60436053
\ contains=namedViewName
60446054
\ skipwhite skipnl skipempty
60456055
\ nextgroup=
60466056
\ namedStmt_ViewSection,
6057+
\ namedStmt_ViewClass,
60476058
\ namedInclude,
60486059
\ namedComment
60496060

test/example-9.16-named.conf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,12 +1323,14 @@ view private_view {
13231323
lame-ttl 35600;
13241324
managed-keys-directory "/etc/bind/keys";
13251325
masterfile-format text;
1326-
server 127.0.0.1/5_name { };
1326+
server 127.0.0.1/5 { };
13271327
zone teenagers_zone { };
13281328
};
13291329

1330-
no_such_keyword;
1330+
# no_such_keyword;
13311331

1332+
# uhhh;
1333+
dnssec-policy asdf.net { };
13321334

13331335
zone empty { };
13341336
zone zone-red {

0 commit comments

Comments
 (0)