On the spur of the moment: to do something suddenly or without planning
Two students talking after class
Vinnie: Hey, Megan. How was your weekend?
Megan: It was fantastic! We spent the weekend hanging out at Huntington Beach. It was so relaxing.
Vinnie: Wow, I didn't know that you had planned a weekend at the beach.
Megan: I didn't plan it at all. My roommate just decided to go there on the spur of the moment and asked me to come along. It took very little to persuade me!
Sam: Hey, Pete. I saw you yesterday with Francesca at that new restaurant on Wilshire Blvd. How did you get a date with her? She is beautiful and smart!
Pete: Well, I still can't believe we went out. I'm always so nervous around her. On Friday, I just happened to see her after class and asked her out to dinner on the spur of the moment.
Sam: And she said "yes" right away?
Pete: She didn't even hesitate! I'm so glad I took the chance and asked her out because she is a really nice person. I want to ask her out again, but next time I'll plan it.
Meaning: “On the spur of the moment” means to do something suddenly or without a plan. In Context 1, Megan and her roommate decided to spend the weekend at the beach without any previous planning, or on the spur of the moment. In Context 2, Pete had not planned to ask Francesca out, but he did it on the spur of the moment and she said "yes."