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
I noticed that source code files in preview look very similar to the way
TextMate displays the same content.
Did TextMate 2 add the feature or was it always part of Finder?
Preview I am talking about is triggered in Finder when you press a space
on a keyboard.
I am using TextMate to write some R code. At the moment, I have R code that
looks like this:
foofoofoofoofoofoo <- NULL
foofoofoofoo <- NULL
foofoofoofoofoo <- NULL
foofoofoo <- NULL
foofoofoofoofoofoofoofoofoofoo <- NULL
Is there a way to automate aligning all <- within a block of code, like
this:
foofoofoofoofoofoo <- NULL
foofoofoofoo <- NULL
Foofoofoofoofoo <- NULL
foofoofoo <- NULL
foofoofoofoofoofoofoofoofoofoo <- NULL
Many thanks
Ross