You need to contact your vet immediately and let him know that your dog is vomiting. This is bad for two reasons. The first, and most obvious one, is that your dog can easily dehydrate if the vomiting is not brought under control quickly. The second reason, however, is the (slightly) more important one and that is that ketoconazole can ONLY be utilized by dogs by taking it internally. They MUST digest the pill to get any effect from it. If they are vomiting the pill back up or if it is zooming through their system via an attack of diarrhea, they are getting no benefit at ALL from the pill and the whole procedure of giving the pill is totally useless since it's not in their stomach long enough to do them any good.
Your vet needs to be made aware of this so that they can either give them a different medication (griseofulvin, perhaps?) or give them something to control the nausea in the event that ketoconazole is the only antifungal they can use on whatever it is your dog has. Please let us know how things turn out! Good luck to you!
Ghilly
Hold food for 24 hours. If there's blood in the vomit, then get him to the ER vet immediately.