probably a cracked distributor cap or old spark plug wires. The crack can be so small you have a hard time finding it but the difference is noticeable after you change it.
What causes a car to idle good and run rough when you give it gas?
One thing could be an over used belt or a leak of antifreeze
Need to know what "it" is.
If the check engine light is flashing, it has "stored a code" meaning that you should be able to read a diagnostic code to find out what's wrong, that way neither of us will need to guess.
A 350 engine will idle good but cut out and run rough while driving if there is a vacuum leak. This causes too much air to enter the engine under load.
the engine will seem to cut out or run really rough
Low fuel pressure, clogged air filter or off timing can all cause rough running. There could be sensor issues or more serious engine internal problems.
good chance the cam and crank shafts were not aligned properly or the engine just needs to be timed correctly
The year, make and model info would be helpful but a large vacuum leak could do that.
You will definitely know if your truck jumps out of time. The engine will run very rough. The engine might not run at all.
What causes a 1998 Pontiac transport to run hot and engine shuts off
YES!