on the spur of the moment
on the spur of the moment {adv. phr.}
On a sudden wish or decision; suddenly; without thought or preparation.
John had not planned to take the trip; he just left on the spur of the moment.
Mary saw a help-wanted advertisement and applied for the job on the spur of the moment.
Categories:
Source: A Dictionary of American Idioms