Bug 1436124

Summary: VIM chooses ft=bindzone for sudoedit /etc/named.conf
Product: [Fedora] Fedora Reporter: Petr Menšík <pemensik>
Component: vimAssignee: Karsten Hopp <karsten>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: gchamoul, karsten, moshima.web, zdohnal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: vim-8.0.514-1.fc25 vim-8.0.514-1.fc26 vim-8.0.514-1.fc24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-30 01:20:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
suggested fix patch none

Description Petr Menšík 2017-03-27 08:58:44 UTC
Created attachment 1266582 [details]
suggested fix patch

Description of problem:
I have configured vim as EDITOR for sudo. But when I want to edit /etc/named.conf, 

Version-Release number of selected component (if applicable):
vim-common-8.0.425-1.fc25.x86_64

How reproducible:
Always

Steps to Reproduce:
1. dnf install bind sudo
2. export EDITOR=vim
3. sudoedit /etc/named.conf

Actual results:
Whole file is highlighted as error, all in red color. Because vim detected file type as binzone, which has very different format.

Expected results:
Vim detects ft=named, as it does for vim /etc/named.conf.

Additional info:
It seems it matches '... ISC BIND named(8) ...' in configuration file. I doubt "BIND.*named" does match zone files of named usually. I would consider to remove it.

More helpful fix is to change path of named config to named*.conf rndc*.conf

Comment 1 Fedora Update System 2017-03-27 19:22:28 UTC
vim-8.0.514-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-e2250620d8

Comment 2 Fedora Update System 2017-03-28 01:50:21 UTC
vim-8.0.514-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-47eb254e1c

Comment 3 Fedora Update System 2017-03-28 08:52:19 UTC
vim-8.0.514-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6766918b0f

Comment 4 Petr Menšík 2017-03-28 16:07:32 UTC
Another file with invalid syntax highlight is /etc/sysconfig/named. It will have wrong highlight when edited directly by vim /etc/sysconfig/named.

Comment 5 Fedora Update System 2017-03-30 01:20:53 UTC
vim-8.0.514-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2017-04-01 17:32:46 UTC
vim-8.0.514-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2017-04-11 17:49:46 UTC
vim-8.0.514-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.