I am not a computer programmer, but use TM as my word processor. I am interested in creating a macro which selects the text from the location of the cursor to the next period in the sentence and then deletes that text. Can anyone tell me how I can go about that?
Thanks for the help.
On Aug 9, 2007, at 10:34 AM, Lawrence Goodman wrote:
I am not a computer programmer, but use TM as my word processor. I am interested in creating a macro which selects the text from the location of the cursor to the next period in the sentence and then deletes that text. Can anyone tell me how I can go about that?
Thanks for the help.
Here you go
that just searches from your current caret position to any punctuation and then deletes it.
thomas Aylott — subtleGradient — CrazyEgg — bundleForge
On Aug 9, 2007, at 10:34 AM, Lawrence Goodman wrote:
I am not a computer programmer, but use TM as my word processor. I am interested in creating a macro which selects the text from the location of the cursor to the next period in the sentence and then deletes that text. Can anyone tell me how I can go about that?
Thanks for the help.
This is my suggestion. It gets also rid of e.g. "1.002" but not "e.g." in a sentence. If such cases like e.g. occur often then I would mean to write a separat script. An other case is if you always write two spaces after a period. That should be possible with a macro.
Hans
Hi,
someone asked for a "delete backwards to a period"-macro, meaning to delete the beginning of a "sentence" from the cursor.
Here is my trial. The only thing which doesn't work is to delete the beginning of the first sentence of a document. Here one can press ⇧+↖ and ⌫. (Or is there someone who has an idea to modify the regexp ;)
If one would replace in both macros (DelToPeriod, DelBackToPeriod) the '.' by [[:punct:]], one could delete to any punctuation mark, declared in the Oniguruma grammar, followed by a space or newline.
Cheers,
Hans