[TxMt] Re: Need help editing a bundle

Martin Kühl martin.kuehl at gmail.com
Mon Aug 15 23:06:22 UTC 2011


On Mon, Aug 15, 2011 at 22:41, kravnh <kjed at 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 it
> 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 command(s)
> 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 count
> 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/.$//'`.

HTH,
Martin


More information about the textmate mailing list