Specifying syntax for hosts file
Posted: Mon Dec 30, 2019 11:34 pm
I'm trying to see whether it's possible to define a syntax file for the hosts file (C:\Windows\System32\drivers\etc\hosts).
Since the file doesn't have a suffix, I created a new syntax file (hosts.syn) with the following:
SingleComment = #
If I open the hosts file and manually set it to use this syntax file, it works, and commented-out lines display differently.
But I can't seem to create a document class which only applies to hosts - creating a new class and specifying "Files in class hosts" as simply "hosts" doesn't work.

Anyone got any great ideas?
Since the file doesn't have a suffix, I created a new syntax file (hosts.syn) with the following:
SingleComment = #
If I open the hosts file and manually set it to use this syntax file, it works, and commented-out lines display differently.
But I can't seem to create a document class which only applies to hosts - creating a new class and specifying "Files in class hosts" as simply "hosts" doesn't work.

Anyone got any great ideas?