Another macro request:
I need a macro that will deletete from the cursor to the end of the sentence (i.e. the period).
Get help using and writing Nisus Writer Pro macros.
2 posts • Page 1 of 1
- Official Nisus Person
- Posts: 4251
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
This should do what you're looking for:
We also have some other sentence navigation macros in our macro repository.
Code: Select all
$deleteStart = Selection Location $deleteLen = 0 # find the end of the current sentence Find '($|\.(?![0-9])|[!?]+)[ \t]*', "E" $selStart = Selection Location $selLen = Selection Length Begin Perl $deleteLen = $selStart - $deleteStart; End # Select the sentence and delete it Set Selection $deleteStart, $deleteLen Delete