problems i had with mine when it did that....mine was only running on 3 cyl instead of 4 i had a stuck injector....if you unplug your spark plug wires from the cap one at a time you can probably find the one thats running bad if this is the problem....unplug number 1 if the engine spits and spudders more plug it back it (be careful not go get shocked haha experience) anyways do that for 2 and 3 and so on if you unplug one that doesnt make the engine spit and spudder more id say that cyl is not running so either you have a bad cap bad wire bad plug or bad injector....if the engine shakes badly at idle id say your only running 3 cyl let us know how it goes
ps...if you find that it is the injector before you pull it and get new ones u can take a hammer and screw driver flat head i prefer and tap on it to try and break free what ever is holding it from working if that doesnt work i have a set of 85 to 87 square top injectors i know work for cheap