nisus.com
https://www.nisus.com/forum/

text editing macros
https://www.nisus.com/forum/viewtopic.php?f=17&t=2437
Page 1 of 1

Author:  Thomas C. Wolfe [ 2007-07-17 08:14:00 ]
Post subject:  text editing macros

I am a new user and am wondering two things:
can one write text editing macros in Nisus Pro and can one start macros with keyboard commands?

you can do this in my previous word processor, M....... W..., and I appreciate the speed with which one can delete sentences, words, etc. with a keystroke combination.

Thanks,
Tom

Author:  martin [ 2007-07-17 13:07:58 ]
Post subject: 

Hi Tom,

You certainly can write text editing macros in NWP. If you have any specific macro in mind, please let me know.

As for keyboard commands, I'm not sure I understand exactly what you're after. You can trigger the menus associated with keyboard commands in macros, eg: your macro would contain the command "New" instead of something that specified Command + N. I hope that makes sense- let me know if you're thinking about something else.

~Martin

Author:  Thomas C. Wolfe [ 2007-07-17 14:26:02 ]
Post subject:  Clarification

Thanks for the reply, Martin, I can be more specific.

I was thinking of two things.

First, cursor movement. I am addicted to the old old wordstar cursor movement commands: ctrl-A is word left; ctrl-S is character left; ctrl-D is character right; and ctrl-F is word right. This sort of thing.

And secondly, edits such as: ctrl-J deletes the rest of the sentence to the right of the cursor. And ctrl-W deletes the word the cursor is in.

In Microsoft word I can either program them in the Keyboard customization area, or I can record small macros to do this work.

I know that there are ways to move the cursor around in OSX, it is just that I am much more comfortable with these old ways.

Is there anyway to do this sort of thing in NWP?

Thanks,
Tom

Author:  martin [ 2007-07-17 15:29:33 ]
Post subject: 

Ah, I think I see what you are looking for now Tom. OSX has most of these things built-in. For example, Option + Right Arrow moves you to the next word, Option + Delete deletes the preceding word, etc. Here is a list that someone has compiled.

Author:  Thomas C. Wolfe [ 2007-07-17 19:36:08 ]
Post subject:  ah ha.

But there is no way to make one's own within Nisus, correct?

Author:  martin [ 2007-07-17 23:32:24 ]
Post subject: 

You can certainly create a macro that manipulates the selection or deletes bits of text. Those macros could then be assigned keyboard shortcuts in NWP preferences.

Author:  Thomas C. Wolfe [ 2007-07-18 09:00:35 ]
Post subject:  sample macro

Martin, please tell me if this request is asking for help that you are too busy to provide. You must receive many questions. But if you could give me an example of say, the text of a macro that would highlight a sentence and then delete it, I could probably write the other ones on my own. I understand that macros are essentially lists of commands taken from the menu bar, but I don't see those commands for such basic things as cursor movement and turning selection on and off on the menu bar. Again, I can make do with the old Cocoa commands (thanks for the list), but if possible I would like to get back to my old keyboard commands.

(Or is there any chance that an upcoming version of NWP would have the ability to record macros?)

Thanks for your help.

Author:  martin [ 2007-07-18 16:12:13 ]
Post subject: 

Hi Thomas, it's no problem. I've created the macros you asked for and placed them in our macro repository.

As for recording macros, I'm not sure if we'll see this any time soon, sorry.

Author:  js [ 2007-07-20 01:58:33 ]
Post subject: 

[quote="martin"]Hi Thomas, it's no problem. I've created the macros you asked for and placed them in our macro repository.

Your sentence selecting macro won't do with a sentence like: "Drinking milk (cf. A. Porter: The softdrink in the Americas) is healthy." Could it be done at all?

Author:  Thomas C. Wolfe [ 2007-07-20 08:22:49 ]
Post subject:  thanks

Thanks so much, Martin, for the macros. They are very useful.

Author:  Thomas C. Wolfe [ 2007-07-25 09:02:00 ]
Post subject:  Pushing the support limit

Dear Martin,
I know I am pushing the customer support limit, but I cannot figure out how to write four (probably simple) macros. If you have a moment, I would be very grateful if you could do this.
1. to move the cursor to the next word
2. to move the cursor to the previous word
3. to delete the word the cursor is in
4. to delete the previous word

I know these are all possible to do with the default key bindings, but the key thing is to be able to map them onto combinations using regular letters of the keyboard. I like the program very much but I am so used to the old ways!

Thanks
Wordstar Wolfe

Author:  martin [ 2007-07-25 12:31:17 ]
Post subject: 

Here you are Thomas, I hope these macros do the job for you!

Author:  martin [ 2007-07-25 12:46:14 ]
Post subject: 

js wrote:
Your sentence selecting macro won't do with a sentence like: "Drinking milk (cf. A. Porter: The softdrink in the Americas) is healthy." Could it be done at all?

I suppose it is possible, it's just a matter of figuring out all unambiguous cases where a period does not indicate the end of a sentence. Some rules that your example sentence illustrates:

1. The period does not follow a single letter.
2. The period does follow a common abbreviation. We'd need to think of a list of these. Using google I've found this list, which seems pretty good.

The problem with rule number two is that an abbreviation may terminate a sentence, eg: "I live on Sapphire Blvd." In this case the macro is out of luck. Would you be be interested in an updated macro that incorporates these rules?

Author:  js [ 2007-07-27 08:48:41 ]
Post subject: 

martin wrote:
js wrote:
Your sentence selecting macro won't do with a sentence like: "Drinking milk (cf. A. Porter: The softdrink in the Americas) is healthy." Could it be done at all?

I suppose it is possible, it's just a matter of figuring out all unambiguous cases where a period does not indicate the end of a sentence. Some rules that your example sentence illustrates:

1. The period does not follow a single letter.
2. The period does follow a common abbreviation. We'd need to think of a list of these. Using google I've found this list, which seems pretty good.

The problem with rule number two is that an abbreviation may terminate a sentence, eg: "I live on Sapphire Blvd." In this case the macro is out of luck. Would you be be interested in an updated macro that incorporates these rules?


Martin, thanks for asking. I don't think that I would use such a macro often, all the more that it should work also for other languages than enlish. Basically I was interested in how it can be done, to get a better grip on macro writing by learning from you. It's good to have this kind of help.

Best

js

Author:  martin [ 2007-07-27 11:51:33 ]
Post subject: 

No problem js, I'm glad you find it useful!

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/