Skip to content

ftdetect, add *.zone* to filetype bind-named #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ftdetect/bind-named.vim
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
" Remarks:
" See syntax/bind-named.vim for additional info.

au! BufNewFile,BufRead named.conf,rndc.conf,rndc.key,*-named.conf,*_named.conf,*.named.conf,named-*.conf,named_*.conf,named.*.conf,rndc-*.conf,rndc_*.conf,rndc.*.conf,rndc.key,rndc-*.key,rndc_*.key,rndc.key,mz.*,sz.*,view.*,named.conf* set filetype=bind-named
Copy link
Owner

@egberts egberts Sep 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*.zone* isn’t going to sit well with the public space of filename matching in the general Vim community. It will catch a lot of files having .zone in the middle of the a filename. The false positive would be too uncomfortable for this plugin to take as-is. (risk alienating the end-users to removing this plugin.

Can we do zone.* or *.zone ? Or both?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, it could break something, i didn't think about this. It worked for me, so i thought to give my changes back 🙂

I have .zone and .zones files, so i would suggest to add *.zone and *.zones, but it's up to you.

au! BufNewFile,BufRead named.conf,rndc.conf,rndc.key,*-named.conf,*_named.conf,*.named.conf,named-*.conf,named_*.conf,named.*.conf,rndc-*.conf,rndc_*.conf,rndc.*.conf,rndc.key,rndc-*.key,rndc_*.key,rndc.key,mz.*,sz.*,view.*,named.conf*,*.zone, *.zones set filetype=bind-named
10 changes: 5 additions & 5 deletions ftplugin/bind-named.vim
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ if namedindent_override_with_local_expandtab != 0
if namedindent_disable_expandtab != 0
" expandtab got defined elsewhere, so we use hard tab, locally
setlocal noexpandtab
echomsg "No nein Expandtabby..."
" echomsg "No nein Expandtabby..."
else
" noexpandtab got defined elsewhere, so we use hard tab, locally
echomsg "Expandtabby..."
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch on this one. I too was a victim of overplugins.

" echomsg "Expandtabby..."
setlocal expandtab
endif
else
setlocal expandtab
filetype plugin indent on
endif

setlocal expandtab
filetype plugin indent on

setlocal completefunc=syntaxcomplete#Complete