[Dnsmasq-discuss] vim highlighting for dnsmasq

Simon Kelley simon at thekelleys.org.uk
Thu May 17 14:24:13 BST 2012


On 17/05/12 14:12, Thilo Six wrote:
> Hello
> 
> i am the author of the vim syntax file for dnsmasq:
> https://vim.googlecode.com/hg/runtime/syntax/dnsmasq.vim
> 
> Currently i am in the process of updating it for 2.61 and have a question
> regarding whether it is allowed for comments starting in the middle of the line.
> The manpage says "Lines  starting with  # are comments and ignored." Does this
> mean comments *must* start at the line beginning?
> 

Checking the code, rather than the documentation, a '#' starts a comment
if it's at the start of a line _or_ preceded  by whitespace. The '#'
must not be within double-quotes.

# this is a comment
log-queries # and this is a comment
# but the hash below doesn't make "53" a comment (no whitespace)
server=/mydomain/1.2.3.4#53
txt-record=txt.mydomain,"this # doesn't start a comment"

HTH

Simon.







More information about the Dnsmasq-discuss mailing list