Subdomain preference setting

I would like to have a preference setting where www subdomains not are created automatically for all hostnames and written to the host file. Since many developers usually use various subdomains such as local, dev and others the host file quickly becomes very cluttered with all these unwanted www hostnames. And feel free to also remove the comment fields #Local Site behind all hostnames in the host file as they only will make it harder to read. Can all hostnames created by Local be sorted alphabetically before they are being written to the host file?