syntax highlighting for IPv6 in resolv.conf (resolv.vim)

29 views
Skip to first unread message

DJ Lucas

unread,
Dec 13, 2019, 2:09:12 AM12/13/19
to vim_use
I really don't understand vim syntax highlighting at all. This works, but I wanted to run it by somebody who actually does. I blatantly stole the additional regex from bindzone.vim, but I've no idea what the contains=@reolvIPCluster bit does in the original or whether I broke anything. It _seems_ to work fine. The fact that it went unresolved for several years combined with it only taking a few minutes of discovery to fix is what concerns me. Is there anything wrong with the below snippet (the first and last match are from the shipped resolv.vim)?

...
" Particular
syn match resolvIPNameserver contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\s\|$\)\)\+/ contains=@resolvIPCluster
syn match resolvIPNameserver contained /\<\(\x\{1,4}:\)\{6}\(\x\{1,4}:\x\{1,4}\)\>/
syn match resolvIPNameserver contained /\s\@<=::\(\(\x\{1,4}:\)\{,6}\x\{1,4}\)\>/
syn match resolvIPNameserver contained /\<\(\x\{1,4}:\)\{1}:\(\(\x\{1,4}:\)\{,5}\x\{1,4}\)\>/
syn match resolvIPNameserver contained /\<\(\x\{1,4}:\)\{2}:\(\(\x\{1,4}:\)\{,4}\x\{1,4}\)\>/
syn match resolvIPNameserver contained /\<\(\x\{1,4}:\)\{3}:\(\(\x\{1,4}:\)\{,3}\x\{1,4}\)\>/
syn match resolvIPNameserver contained /\<\(\x\{1,4}:\)\{4}:\(\(\x\{1,4}:\)\{,2}\x\{1,4}\)\>/
syn match resolvIPNameserver contained /\<\(\x\{1,4}:\)\{5}:\(\(\x\{1,4}:\)\{,1}\x\{1,4}\)\>/
syn match resolvIPNameserver contained /\<\(\x\{1,4}:\)\{6}:\x\{1,4}\>/
syn match resolvIPNameserver contained /\<\(\x\{1,4}:\)\{1,7}:\(\s\|;\|$\)\@=/
syn match resolvHostnameSearch contained /\%(\%([-0-9A-Za-z_]\+\.\)*[-0-9A-Za-z_]\+\.\?\%(\s\|$\)\)\+/
...

This or similar needs to be added to resolv.vim upstream, but figured I'd post in the user forum for a sanity check first.

Thanks in advance.

--DJ

Christian Brabandt

unread,
Dec 13, 2019, 3:04:53 AM12/13/19
to vim_use
Can you contact the maintainer of the file? It hasn't been changed in a
long time, so it could be he is no longer active.

Best,
Christian
--
Alles in der Welt endet durch Zufall und Ermüdung.
-- Heinrich Heine

DJ Lucas

unread,
Dec 13, 2019, 8:49:53 PM12/13/19
to vim_use
I now understand those two other two entries. If I would have looked at them for a few more seconds. :-) Wish I would have gotten this in before 8.2. At any rate, this should be good to go in. What's the preferred method to submit a patch (if even required for such a simple change)?

--DJ

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20191213080446.GZ28132%40256bit.org.

Bram Moolenaar

unread,
Dec 14, 2019, 7:18:14 AM12/14/19
to vim...@googlegroups.com, DJ Lucas

> I now understand those two other two entries. If I would have looked at
> them for a few more seconds. :-) Wish I would have gotten this in before
> 8.2. At any rate, this should be good to go in. What's the preferred method
> to submit a patch (if even required for such a simple change)?

You can send me the new version of the file.

Please update the header, changing "Maintainer" to "Previous Maintainer"
and adding yourself as the maintainer.

Thanks for updating this syntax file.


--
hundred-and-one symptoms of being an internet addict:
10E. You start counting in hex.

/// Bram Moolenaar -- Br...@Moolenaar.net -- 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 ///

DJ Lucas

unread,
Dec 14, 2019, 6:29:18 PM12/14/19
to vim_use


On Saturday, December 14, 2019 at 6:18:14 AM UTC-6, Bram Moolenaar wrote:

> I now understand those two other two entries. If I would have looked at
> them for a few more seconds. :-) Wish I would have gotten this in before
> 8.2. At any rate, this should be good to go in. What's the preferred method
> to submit a patch (if even required for such a simple change)?

You can send me the new version of the file.

Please update the header, changing "Maintainer" to "Previous Maintainer"
and adding yourself as the maintainer.

Thanks for updating this syntax file.

The current maintainer, Radu Dineiu has agreed to take a look at the PR on GitHub. I presume he will complete the request. If not, I'll post here.

Thanks.

--DJ
 
Reply all
Reply to author
Forward
0 new messages