matthew ephraim

Textmate Paste History

TextMate has a neat paste history feature that allows you to stack copied text in a queue and then paste the text back into the editor sequentially or out of order.

To try it out, select a section of text and choose “Copy” from the Edit menu or hit Command + C (⌘C). Then select another section of text and copy again. Now you have two items in the queue. To paste the first item the queue, choose “Paste” from the Edit menu or hit Command + V (⌘V). This is the normal pasting behavior that you’re probably used to.

To take advantage of your pasting history, choose “Paste Previous” from the Edit menu or hit Shift + Command + V (⇧⌘V). You have now pasted the very first item that you copied, and the paste history has moved backward in the queue. So, if you were to choose the regular paste command again, it would paste the first item in the list, instead of the second.

To move forward to the second item again, hold the option key and choose “Paste Next” from the Edit menu or hit Option + Command + V (⌥⌘V). Now the second item has been pasted and the queue has moved back to the second item again.

Now let’s say that, instead of 2 items in your list, you had 10 items in your list. You probably wouldn’t want to move backward and forward through the whole list of items every time you wanted to paste something. From the Edit menu choose “Paste From History” or hit Ctrl + Option + Command + V (^⌥⌘V). You should be presented with a menu like the one below.

Scroll through the list and paste hit return to paste one of the items from the queue.