Using macros as a second clipboard
This isn’t really either a macro recipe or a power tip, but it’s a useful trick.
Sometimes I’ll run into a situation where I want two different things on the clipboard at once. Maybe I’m passing a filename through several layers of methods, and at each layer, I’m typing
; AFileName: string
twice (once in the class declaration, once in the method implementation), and
, AFileName
once (where the value needs to be passed along to the next guy). Wouldn’t it be nice if I had two clipboards, each with its own “paste” keystroke?
Once you think to use a macro as the second “clipboard”, it’s trivial. Select ; AFileName: string and copy it to the clipboard; then start recording a macro, type , AFileName, and stop recording.
Voila — two clipboards. Paste one with Ctrl+V, and the other with Ctrl+Shift+P.
April 9th, 2008 at 11:56 pm
Good trick!
I had similar problems but never thought of that solution
Maybe just because of that I found even better solution - ClipX (http://bluemars.org/clipx/). It’s a freeware clipboard manager that hooks into the system and remembers last 25 items copied to the clipboard. Good stuff.
April 10th, 2008 at 9:46 am
+1 for ClipX. Can’t work without it, or at least SOME kind of clipboard extender.