Thanks for your reply. I can do what I want with the command you supplied.
However, I don't know how to insert the regexp into my current macro. I am
not a developer. I use TextMate for one specific purpose: to change the
format of audio timecodes to a syntax that is compatible with an online
learning system. It takes a list of Start and End times that look like this:
and does the following: adds a leading digit to the first pair, replaces the
"'" with a ":", and replaces the "." with a
":", and deletes the TAB-Start
and TAB-End. I also need it to delete the last character of each line, so I
end with a list like this:
I was able to cobble together a macro that does everything but remove the
last digit. I use a series of findWithOptions commands. I have attached the
macro I use. What would I need to add to this macro to delete the last
character of each line?
Thank you so much for your help.
Martin Kühl-3 wrote:
On Mon, Aug 15, 2011 at 22:41, kravnh <kjed(a)comcast.net> wrote:
I have written a bundle (a macro actually) that
edits a file by
finding/replacing characters. However I want to add the functionality for
to also delete the last character of each line of the document. I tried
using the command moveToEndOfParagraph and DeleteBackward, but it only
deletes the last character of the last line of the document. What
would I use for the macro to delete the last character of every line? The
number of lines in the document will vary, so I cannot put a hard line
into the macro.
Create a macro that regexp-replaces ".\n" with "\n".
Or just use a command instead of a macro, say with `sed 's/.$//'`.
textmate mailing list
View this message in context:
Sent from the textmate users mailing list archive at Nabble.com