It would be really nice if there where syntax highlighting for the dhcpd.conf file in vim. I don't know how big a task it would be to implement :) Reproducible: Always Steps to Reproduce:
http://www.vim.org/scripts/script.php?script_id=744 ^^ try that. If it's any good I'll make a -syntax package for it.
I tried downloading it to /usr/share/vim/vim63/syntax and run vim on dhcpd.conf, but it highlights nothing, is there something I should do to "load" the syntax file?
You'll need to do :setf dhcpd for now. If we go with this one I'll add an ftdetect file for it that'll do this for you.
It works nice, though it cannot tell if I define two servers as etc. ntp-servers like this: option ntp-servers 193.162.159.194, 192.168.3.1; "option ntp-servers" is green. "193.162.159.194," is white (should be red). "192.168.3.1;" is red.
--- dhcpd.vim.orig 2005-03-24 16:41:59.755564944 +0000 +++ dhcpd.vim 2005-03-24 16:42:15.894111512 +0000 @@ -33,7 +33,7 @@ " Base constructs {{{ syn match dhcpdString +"[^"]*"+ syn match dhcpdDecNumber "\<-\?\d\+\(;\|\s\|$\)" -syn match dhcpdIPv4 "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(;\|\s\|$\)" +syn match dhcpdIPv4 "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(;\|\s\|,\|$\)" syn match dhcpdMAC "\<\(\x\x\?:\)\{5}\x\x\?\(;\|\s\|$\)" syn match dhcpdDate "\<[0-6]\s\d\{4}/\d\d/\d\d/\s\d\d:\d\d:\d\d\(;\|\s\|$\)" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" }}} How's that?
Yep, that works :)
app-vim/dhcpd-syntax