I am wondering if you have a problem with gastric motility. That is why I suggested domperidone. You mention about vomiting with food. If your problem was a stomach ulcer, then you are more likely to have symptoms without food and food would make you feel better.
Gas can be produced in sthe stomach by excess acid, however it is either burped/belched upwards or passes through the intestines until it is passed as flatuelence. If you are having problems passing wind at the rectal end, then this may also indicate reduction in intestinal peristalsis.
If the symptoms were acute, ie occurred very suddenly and were associated with pain then I would be concerned about intestinal obstruction. However the text of your question implies this has happened on several occasions.
If the medication does not help, then I would want you to see your doctor to discuss an endoscopy as this would allow your doctor to see the lining of the stomach and upper intestines.
Does this help?
If this answered your question please click ACCEPT, use reply if there is something else you need to know regarding your question.Positive feedback or bonus is very much appreciated.