Wednesday, April 30, 2008

Repeat Last Macro

There are times I want to repeat a macro just a few times. I know you can do count@{0-9a-z":*} but sometimes I don't feel like counting. You can use @@ to repeat the last macro, and it's an easy command to type very quickly, so it fits the bill.

2 comments:

Unknown said...

Thanks, Travis. You just saved my job.

Unknown said...

Fantastic advice, very useful for adding stuff in the beginning of a line. When I print of large amounts of text in IDL, you need to put print,' string goes here '.

So I define the macro which puts the print, ' in the begining and the ' in the end and with your advice, it's a piece of cake to do that for 50 lines. Just need to make sure I get my finger of the @ in time...

Many thanks!

Daniel