Can anyone help me with this? I have the following, very helpful
AppleScript that capitalizes the first letter of every word that I
select/highlight:
tell application "BBEdit"
tell window 1
if selection as text is "" then
set cursorPoint to characterOffset of selection
find "\\b\\w" options {search mode:grep, backwards:true} with selecting
match
set selection to (grep substitution of "\\U&")
select insertion point before character cursorPoint
else
change case selection making capitalize words with replacing target
end if
end tell
end tell
It does what it's supposed to do perfectly. However, I also need it to
make (or keep) all of the following words lower-case:
a
an
and
as
at
but
by
for
from
in
into
it
nor
of
on
onto
or
so
the
to
with
Basically, I need it to convert selected text to "Title Case." For
example, both "converts a selected string of words to title case" and
"CONVERTS A SELECTED STRING OF WORDS TO TITLE CASE" need to become
"Converts a Selected String of Words to Title Case."
I'd greatly appreciate the help.
Thank you!
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].