[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
keyboard macro question
From: |
Benjamin |
Subject: |
keyboard macro question |
Date: |
Fri, 2 Oct 2009 07:05:40 -0700 (PDT) |
User-agent: |
G2/1.0 |
I use keyboard macros fairly frequently, but I often run into a
situation where I would like to increment a number in the macro, e.g.,
if I start with:
tmp tmp tmp tmp
and I want to end with:
tmp1
tmp2
tmp3
tmp4
I know how to create the macro where it would result in:
tmp1
tmp1
tmp1
tmp1
Is there a way to make the number increment each time the macro is
executed?
Otherwise I am forced to step down through each line and manually put
the numbers in 1, 2, 3, 4, ...
Naturally this is a greatly shortened example for illustration
purposes, and often the incrementing takes place within a longer
statement e.g., tmp(:,1) = function(x,y). My interest here is how to
increment or decrement the number in a more automatic fashion.
I don't mind doing something other than macros, or even external
commands (perl/sed/awk, etc.)
to assist with this.
Thanks,
-Ben
- keyboard macro question,
Benjamin <=
- Re: keyboard macro question, Joost Kremers, 2009/10/02
- Re: keyboard macro question, David Kastrup, 2009/10/02
- Re: keyboard macro question, Colin S. Miller, 2009/10/02
- Re: keyboard macro question, Eric, 2009/10/02
- Re: keyboard macro question, Xah Lee, 2009/10/04