Switching from Word: how do I...?

Everything related to our flagship word processor.
Post Reply
Galloper
Posts: 2
Joined: 2008-06-12 10:37:15

Switching from Word: how do I...?

Post by Galloper »

I'm new to Macs and HATE MS Word; have for years on DOS and Windows machines.
But I'm used to Word.
How do I assign keyboard shortcuts/macros to commands, e.g. in Word, Shift-F3 capped the initial letter of a word, hitting it again capped the whole word and a third time returned to all lower case. Can I at least create a keyboard shortcut to cap the initial letter?
Or create a keyboard shortcut/macro to insert the date?
I've read parts of the PDF manual that refer to keyboard mapping and macros and I can't find any information that lets me do what I'm after. I CAN map menu commands to a keyboard shortcut. Can I route a macro I record in NWP to a keyboard shortcut? Does NWP's macro capability allow me to "record" a macro, again as in Word?
How do I tell NWP to create initial cap automatically in a new sentence? Is there a way to do auto correction so if I type "europe" it changes it to "Europe"?
I've done some searching here on the forum and must be using the wrong text to search: found nothing.
Any pointers are much appreciated--I'd like to make NWP my word processor, but I've Word so well adapted to me after years of using it, it's hard to shift.
Many many thanks.
Galloper
User avatar
martin
Official Nisus Person
Posts: 5230
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Switching from Word: how do I...?

Post by martin »

Keyboard shortcuts in NWP are always mapped to a menu command. Put another way, if it's not on the menu, you probably can't create a keyboard shortcut for it. That said, macros appear on the menu, so any macro you create can be assigned a keyboard shortcut. You do so in NWP's preferences, in the "Menu Keys" pane. You should see the macros listed there, which includes date insertion macros.

There's currently no way to have NWP automatically capitalize words at the start of a sentence for you. However, the following macro will cycle the capitalization of the word just before the insertion point:

Code: Select all

# This macro cycles the capitalization of the word just before the
# caret (insertion point). The case change rotates from all lowercase,
# to title case, to all uppercase, and finally back to all lowercase.
Require Application Version '3.1'

# find options we use: reverse, PowerFind Pro and don't wrap
$findOps = 'rE-W'

# save current selection
$startSelRange = TextSelection.activeRange
$curSelRange = $startSelRange

# skip any whitespace and punctuation between caret and the word
If Find '[\p{Space}\p{Punct}]+', $findOps
	$foundRange = TextSelection.activeRange
	If $foundRange.bound == $curSelRange.location
		Select Start
		$curSelRange.location = $foundRange.location
	Else
		TextSelection.setActiveRange($startSelRange)
	End
End

# check if word is already all caps
If Find '\b\p{Upper}+\b', $findOps
	$foundRange = TextSelection.activeRange
	If $foundRange.bound == $curSelRange.location
		Menu 'Convert:To lowercase'
		TextSelection.setActiveRange($startSelRange)
		Exit
	End
	TextSelection.setActiveRange($curSelRange)
End

# check if word is title case
If Find '\b\p{Upper}\p{Lower}+\b', $findOps
	$foundRange = TextSelection.activeRange
	If $foundRange.bound == $curSelRange.location
		Menu 'Convert:To uppercase'
		TextSelection.setActiveRange($startSelRange)
		Exit
	End
	TextSelection.setActiveRange($curSelRange)
End

# check if word is lowercase
If Find '\b\p{Lower}+\b', $findOps
	$foundRange = TextSelection.activeRange
	If $foundRange.bound == $curSelRange.location
		Menu 'Convert:To Capitalized'
		TextSelection.setActiveRange($startSelRange)
		Exit
	End
	TextSelection.setActiveRange($curSelRange)
End

# no match
TextSelection.setActiveRange($startSelRange)
Galloper
Posts: 2
Joined: 2008-06-12 10:37:15

Re: Switching from Word: how do I...?

Post by Galloper »

Thanks, Martin
After years of tweaking Word to work the way I want it to, I'll have fun making some adjustments to myself to work with NWP.
I like the program: speed, features, not too much bloat: good stuff.
I understand there's no macro recorder; that would be a terrific feature to include. I've no time or desire to learn Perl.
Are you aware of a mac compatible macro recorder that would accomplish what I'm after, something like Quickeys?
Anyway, I'll muddle along and learn NWP. Anything's better than word...
Thanks again.
Galloper
User avatar
greenmorpher
Posts: 767
Joined: 2007-04-12 04:01:46
Location: Melbourne, Australia
Contact:

Re: Switching from Word: how do I...?

Post by greenmorpher »

Hiya Galloper, welcome to the stable WP :D

I've just had some sort of either brain fade or electronic fade. I wrote a detailed reply, thought I had posted it, but it hasn't appeared. So here goes again.
Galloper wrote:How do I assign keyboard shortcuts/macros to commands, e.g. in Word, Shift-F3 capped the initial letter of a word, hitting it again capped the whole word and a third time returned to all lower case. Can I at least create a keyboard shortcut to cap the initial letter?
Yes, you assign a keyboard shortcut to the "Capitalize" command in the Convert sub-menu. Go Preferences > Menu Keys > Edit > Convert ... then select the command you want, and give it a keyboard short cut. The shortcuts always run off the command (apple/splat) key by default. You can add other modifier keys to be held down at the same time, any oir all of option, control, shift. Then you add the alpha/number keys you want to use, up to three, I think it is, hit serially. You can use this to give you a mnemonic. E.g. I use command-shift-l-c for convert to lower case.
Galloper wrote:Or create a keyboard shortcut/macro to insert the date?
Macros for this are already among those present in the macro folder (find it to view at leisure, go to: Finder | User (you/account holder) | Library | Application Support | Nisus Writer | Macros). You'll find date and date/time macros in the "Insert" and "changing text" folders. Double click on them to open them in NWP so you can see how they are written.
Galloper wrote:I've read parts of the PDF manual that refer to keyboard mapping and macros and I can't find any information that lets me do what I'm after. I CAN map menu commands to a keyboard shortcut. Can I route a macro I record in NWP to a keyboard shortcut? Does NWP's macro capability allow me to "record" a macro, again as in Word?
You can give any macro a keyboard shortcut because macros are in menus. For Preferences > Menu Keys > Macro > and choose the macro you want and apply a keyboard shrotcut to it as above.

You don't record a macro in NWP, you type out a Nisus Macro simply by typing the menu commands into a new document in NWP then saving to the macro folder using the "Nisus Macro" format from the formats drop-down menu at the bottom of the save dialog.

This is dead simple. Have a look at a couple. Go to the macros folder in the finder, double click on one with the suffix ".nwm" to open it and you will see something like:

Select All
Smart Quotes to Plain Quotes

That's it. You may have this as "Plain quotes" macro. If you don't, just type those two lines (or copy and paste them) to a new document, and save them as described above.

By the way, you can look at the macros one at a time by using the Open Macro Folder in the Macro menu.
Galloper wrote:Is there a way to do auto correction so if I type "europe" it changes it to "Europe"?
Go to Preferences > Quickfix > and check "Fix typos". Then enter "europe" as the trigger and "Europe" as the replacement. Do the same for everything else you can think of.

Cheers, Geoff :o

Geoffrey Heard, Business Writer & Publisher

"Type & Layout: Are you communicating or just making pretty shapes" -- the secrets of how type can help you to sell or influence, now at the new low price of $29.95. See the book at http://www.worsleypress.com or Amazon.
Post Reply