There’s no regex. You’d have to write a command.

If you made a rectangular selection, a command to fill the right hand side with increments of the first number would be quick to write

I think that there’s an unexploited gap for a bundle handling numeric input and row/column/cell structures, enabling things like fill down, across, sum down etc.


On 8 Oct 2013, at 11:21 AM, Ross Ahmed <rossahmed@googlemail.com> wrote:

Lets say I have a list of code like this

foo <- "test"
foo <- "test"
foo <- "test"
foo <- "test"
foo <- "test"
foo <- "test"
foo <- "test"
foo <- "test"
foo <- "test"
foo <- “test"

Is it possible to automate the insertion of columns of numbers. The output should be this:

foo1 <- "test1"
foo2 <- "test2"
foo3 <- "test3"
foo4 <- "test4"
foo5 <- "test5"
foo6 <- "test6"
foo7 <- "test7"
foo8 <- "test8"
foo9 <- "test9"
foo10 <- “test10”

Is there perhaps a regex or other automation that could be used? I’m aware that it is possible to insert line numbers but this will only be useful if the 10 lines of code happen to be on lines 1-10.

Thanks
Ross