2003 Ford Ranger Reving

I have a 2003 Ford Ranger, 5 speed, with 180k miles.
SOMEtimes, not all the time, when I press the clutch and shift gears, the engine will rev.
I dont drive the truck a whole lot, its a 2nd vehicle.
Any thoughts?

The problem might be with the Idle Air Control valve. http://www.rockauto.com/catalog/moreinfo.php?pk=1006261&cc=1438309

Get the engine up to operating temperature. And while the engine is idling take the handle of a screwdriver and tap on the IAC valve. If the engine idle speed changes replace the IAC valve.

Tester