A defective Oxygen Sensor can cause the car to not idle or even run correctly if it is over reporting. If the Oxygen Sensor is telling the Engine that too much fuel is going into the engine, the the engine and can/ will shut off the fuel to the engine, so don't dismiss a bad oxygen sensor.
As for the vacuum issue, check the engine codes to see if there are any intake manifold runner control codes, because those too can act like a huge vacuum leak and will cause the engine to run poorly when it warms up . When the engine is cold, it runs very much richer and ignores the oxygen sensor until it gets up to at least 160 degrees, so an engine with a bad vacuum leak, a bad Mass Air Flow Sensor or a bad Oxygen Sensor can run pretty well when it is cold, because the richer cold running mixture covers up a multitude of sins.