Friday, December 13, 2019

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

On Do, 12 Dez 2019, DJ Lucas wrote:

> 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.

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

--
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20191213080446.GZ28132%40256bit.org.

No comments: