[TxMt] Set temporary variables within macro

Richard Blumberg richard at rnet.org
Tue Nov 20 10:56:02 UTC 2007

Thanks, Hans.

I'd pretty much concluded that what I was trying to do was impossible, the
way I was trying to do it.

What I wound up doing was creating three snippets that generated the code
for the various links and anchors, along with a command that placed a unique
id on the clipboard: "echo -n `date -n '+%H%M%S'` | pbcopy". The snippets
inserted a placeholder "%0" at the point where I wanted the id.

Then it was pretty simple to string the snippets together in a macro, at the
end of which a Find/Replace operation, using the clipboard for the replace
string, inserted the text I needed at the proper points. It works great.
TextMate is wonderful!

Thanks again.


Hans-Jörg Bibiko wrote:
> On 19 Nov 2007, at 20:29, Richard Blumberg wrote:
>> <snip problem >
> Hmm, I don't see way to do this via macros. Did you think about to  
> write a (shell/perl/ruby/etc) command for that problem?
> If there are reasons to use macros, well I believe TMTOOLS could do  
> that. With TMTOOLS you can execute dynamic generated macros using a  
> bash shell. But as I mentioned in an earlier mail, TMTOOLS should  
> ONLY be used for 'private scripting'.
> Cheers,
> --Hans
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate

View this message in context: http://www.nabble.com/Set-temporary-variables-within-macro-tf4837937.html#a13854523
Sent from the textmate users mailing list archive at Nabble.com.

More information about the textmate mailing list