do something on the spur of the moment vs think on one's feet

do something on the spur of the moment

think on one's feet

verb
  • When one is in the middle of a process, activity, or conversation, to adjust rapidly, effectively, and intelligently to new developments or changing circumstances. 

How often have the words do something on the spur of the moment and think on one's feet occurred in a corpus of books? (source: Google Ngram Viewer )