[TxMt] Re: [FeatReq] Scratchpad

Hans-Jörg Bibiko bibiko at eva.mpg.de
Tue Sep 2 19:10:39 UTC 2008


On 02.09.2008, at 20:32, guerom00 wrote:

>
> The bonus would be multiple scratchpads, yes. One per TextMate  
> opened window.

I do not know but one could do this also with TM's built-in  
functionality.

Supposing one has a tmCommand with this shell script bound to APPLE+C:

Input: selection or nothing
Output: none

Command:
[[ -z $TM_SELECTED_TEXT ]] && exit 200
date "+%n+==========+ %Y-%m-%d %H:%M:%S" >> ~/Desktop/Scratch.txt
echo -en "$TM_SELECTED_TEXT" | tee -a ~/Desktop/Scratch.txt | pbcopy


This script appends a time stamp line with an unique beginning  
followed by the content of the selection to ~/Desktop/Scratch.txt.

One also could add the file name of course.
Then one could write an easy script (maybe with a GUI) to look for a  
specific scratch by time, file name, content etc.

OK, this cannot handle images and rtf stuff, but I do not need this  
in TM.

Cheers,

--Hans



More information about the textmate mailing list