On Monday, March 27, 2017 at 9:12:47 PM UTC+2, Bram Moolenaar wrote:
> zdohnal wrote:
> 
> > I encountered problem with syntax highlighting when I set vim as my
> > editor using command 'sudoedit'. I can reproduce it like in Fedora:
> > 
> > 1) $ sudo dnf install vim bind
> > 2) $ export EDITOR=vim
> > 3) $ sudoedit /etc/named.conf
> > 
> > As result, there is syntax highlighting for bind zone file, not for
> > named.conf. I saw it is common issue (sudoedit creates copy of file in
> > /var with name namedXXXX.conf , so hard-coded regular expression in
> > filetype.vim doesn't recognize it), but always fixed as workaround on
> > local machine.
> > Is there any reason why these fixes aren't in VIM by default (I think
> > it can be like in attached patch - just edit regular expression)? Can
> > we fix it at least for named.conf, because when VIM recognizes
> > named.conf filetype badly as bind zone file (because of
> > scripts.vim:323), it shows all text in red color.
> 
> Thanks for the hing.  I think it's find to includ this.
> But aren't there many more files that one would use sudoedit for?
> 
> 
> -- 
> hundred-and-one symptoms of being an internet addict:
> 219. Your spouse has his or her lawyer deliver the divorce papers...
>      via e-mail.
> 
>  /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
> ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\  an exciting new programming language -- http://www.Zimbu.org        ///
>  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Yes, that is probably the biggest problem with vim+sudoedit, that sudoedit can 
(I think) open any file and do the same as with named.conf. I think the best 
solution can be adding other script.vim, which checks changes names created by 
sudoedit.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui