I store, commands found at http://www.commandlinefu.com/commands/browse, in a text file. If I open this text file in Vim and I want to execute the command where the cursor is actually located I do copy the line with Y, switching to command mode with : and !CTRL+r* Is there a more "lazy" possibility ;)
Then just bang on ,x
I think you're asking about shell commands, but if you wanted to do Vim commands, you can read your commands into a register and then run them as macros. Registers used for recording macros and yanking text are the same.
For example: create text file with
with that file open, type
then type @a to run that command
You can save any macro like this for later.
Then put it in a file: