5

I like smart quotes and curly quotes (unlike most people of the internet, apparently). I'm on macOS Mojave, Version 10.14.3. I have both of these preferences turned on:

TextEdit preferences:

Smart quotes is checked

System-level keyboard preferences:

Use smart quotes and dashes is checked

However, whenever I launch TextEdit, Substitutions > Smart Quotes is turned off, and as I write, my apostrophes and quotation marks don't get converted into curly ones:

Edit > Substitutions > Smart Quotes is unchecked

Currently, I have to manually turn on Smart Quotes every time I launch TextEdit. How can I make TextEdit always have Smart Quotes enabled at launch?

Thank you!

1 Answer 1

1

TextEdit saves the state of that switch in each document, apparently; so to get round that you need something along the lines of this - Applescript Won't Invoke Shortcut Command - to test for it each time [The link contains a lot of 'live' research & guesswork, but the last answer at https://apple.stackexchange.com/a/209219/85275 is the one that finally nailed it]

Using that as a base, try this…

tell application "System Events" to tell process "TextEdit"
    set v to (value of attribute "AXMenuItemMarkChar" of menu item "Smart Quotes" of menu 1 of menu item "Substitutions" of menu 1 of menu bar item "Edit" of menu bar 1)

    if v = "✓" then
        click menu item "Smart Quotes" of menu 1 of menu item "Substitutions" of menu 1 of menu bar item "Edit" of menu bar 1
    end if
end tell

You could save it as a Service & invoke with a key command.

Late thought:
Make sure you are working on an rtf document, not plain text, as you have the pref set to only be 'smart' in rtf.

1
  • 1
    Wow, total fail on my part. Changing that pref was the answer. Thank you so much! (I also learned something new about tell application.)
    – Aubrie
    Commented Oct 22, 2019 at 1:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .