Hi K. -
My son is 20 months, and he has had a "virus" three times this winter that sounds like what your son has. For a week or two, my son will not have his usual appetite, then throw up maybe once a day, or even once every two or three days. Usually at meals or in the car.
ecause he is not vomiting every time he eats, and he instantly feels better after he vomits, it doesn't seem like he is sick. He had this last week - vomited Sun night, Wednesday, Friday, and then was finally eating his normal amounts by this Monday morning. This time diarrhea accompanied the illness, but it doesn't always.
I would feed through it, but stick with bland foods, and I cut out dairy except yogurt during this time. He never got sick like this before age 1 (during breastfeeding), but I don't think you should cut out breastmilk or formula.
We took him to the Dr. the first time he had this, and they just said, "Probably a virus, feed through it if he is willing to eat, stick with bland foods and BRAT "anti-diarrhea" diet (bananas, rice, applesauce, toast, call if changes"
Of course, take him to the Dr. if you feel that's prudent, but otherwise I would watch him carefully and hopefully it will stop in the next few days. Good luck!
JAM