I'm looking for ideas to make autocorrect on macOS better

I’m working on autocorrect for Bike. I’ve made progress, but I also have concerns. While macOS autocorrect seems generally useful, it also seems that many people (including me) disable it by default.

I’d like Bike’s autocorrect implementation to be better, but I’m not sure what the problem is in the first place. I make a ton of typos, why do I disable autocorrect? I’m not entirely sure.

I hope to get some ideas in this thread.

If you have a moment please let me know your thoughts on autocorrect. Do you use and like it? Do you hate it. What parts do you like and what parts don’t you like. What could I do in Bike to make it better?

I’m talking specifically about macOS autocorrect as implemented in TextEdit. I will generally follow that implementation in Bike. I’m not looking for blue sky ideas, I just want to make improvements to the existing implementation. Mostly around UX for indicating and undoing corrections.

I’ll post some of my own ideas tomorrow. I look forward to hearing your thoughts.

2 Likes

I use the native macOS in other apps (TaskPaper included) and I am quite happy with ii.

Screenshot 2022-11-06 at 3.33.29 PM

The only time I am not happy with it is the rare moments when it substitutes the wrong word.

2 Likes

Here are some complaints and proposed changes.

I’m using TextEdit autocorrect as the baseline “standard macOS” behavior. I encourage people to explore that behavior, and also try out MS Word and Google docs for alternative approaches.

Also am interested if there are other autocorrect systems that I should try. Please note that I’m talking about autocorrection here (fixing something that was typed) vrs autocomplete which is more offering suggestions that match. They are similar ideas but I think that the same UI wise.

Don’t show correction popup as you type

If you type a word slowly TextEdit shows a completion popup for the word that you are typing… allowing you to hit <space> to complete the word.

In theory this can be useful because it will save you typing and help you pick a correct spelling, but in practice I think it adds to much unpredictability to the autocomplete system:

  1. There’s not an exact time it will show, you need to wait for it.
  2. Sometimes it just won’t show up because it has no suggestion, or is in some editing state where it doesn’t want to show. This means you might wait for it as described in 1., but it will never appear.
  3. Often if you are typing medium speed it will just flash at times when you don’t really want it, but when you’ve paused just long enough for it to think you want it.

Neither Google docs or MS Word have this popup as part of their autocomplete system, so it doesn’t seem necessary. I think helpful to get rid of it.

Undo corrections only and don’t change selection

Autocorrect is usually right, but when it’s wrong I want a quick way to undo. In TextEdit if I type hello<space> it autocorrects to Hello<space>. That’s fine, but if I didn’t want it capitalized then I need to:

  1. Command-Z to undo
  2. Then I get hello fully selected
  3. So I need to Right arrow and then re-enter the <space> again

Improvement is for undo to just undo the capitalization. Leave caret and space in original positions. Also instead of having to undo I like how Google Docs overrides delete key to undo the last autocorrection.

Show revert and spelling popups immediately for whole word range

If you want to revert a correction, or see spelling suggestions for a misspelled word you can move the text caret to the end of the word, and then a popup will show… except there area bunch of conditions on this.

From what I can tell:

  • Popup shows

    • if use left arrow key to move to end of word
    • if use Option-Right arrow key to move to end of word
    • if use Up or down arrow key to land anywhere in word
    • for all these cases the popup doesn’t show immediately, it waits a beat, and so won’t show if you are moving caret fast.
  • Popup doesn’t show

    • if use right arrow key to move to end of word
    • if use mouse to place caret anywhere in word

To me this is too much variability. I would rather see these popups either never or immediately anytime the text caret moves into a word that’s been corrected or has spelling errors. Google docs works this way showing the popups immediately whenever caret is in word. And MS Word works the opposite way, never showing any popup unless you click on the word.

Show correction underlines for the current sentence range?

When TextEdit makes a correction it will indicate the corrected word by drawing a blue underline under the word. It draws this underline when the correction happens, and then removes it when you type the next letter.

The blue underline will also be drawn (sometimes, I can’t really understand the behavior that I see) when move text caret into the word.

I wonder if this is enough indication time, and if I would trust the autocorrect system more if the blue line correction indicators were always show for the current sentence that I’m editing.

This would mean less flashing on/off of indicators and it would make corrections harder to miss. I think it would be better, but not entirely sure.

Show spelling error underlines more predictably

TextEdit shows a red spelling error underline when you misspell a word. I like this. I also like that as I’m part way through typing a word it does not show a spelling underling for the partially formed word.

Where I get confused and think it’s trying to be too clever is when I go back to edit a spelling error. As soon as I edit a misspelled word it removes the spelling error underline, and then doesn’t recheck the word until I go start editing a different word. Makes trying to manually fix a spelling error frustrating.

I think a better rule is:

  1. Don’t spell check a new word until you are finished writing it
  2. Always check and underline all other cases immediately

Unpredictable when corrections can happen

I’m not sure I have a better solution here, but I find it quite hard to determine when a correction can actually happen. In TextEdit the intended rule seems to be that corrections can happen after you have finished typing a NEW word.

This means if you go back into a sentence and edit an existing word and then keep typing a correction will not happen in that word.

I wonder if it would be better to not track the “new word” state and just always apply corrections when you finish typing a word. And by finish typing I mean type a non-word character such as a space after the word.

This seems to be how both Google docs and MS Word work.

The hardest things about autocorrect for me:

  • i don’t always want my typing to be correct. sometimes i want to work outside of the rules; autocorrect forces these rules when i don’t want them.

  • I want to get better at spelling, typing, and grammar. I feel that autocorrect is trying to work in the background so much that I sometimes miss what it’s doing, and I can’t (1) learn from my mistakes and (2) as I said above, decide when I want and don’t want to use its suggestions.

For me personally, I’d love it if nothing was ever changed automatically, but simply underlined in red until I either do something to indicate that I’m okay with the “wrongness” and want the red underline to go away or that I would like it to go ahead and fix the problem for me.

It would feel nice to finish writing an entire page of text, see a few red underlines, click (somehow) to ignore a few of the issues, and then click (some other button) to say “okay, go ahead and fix the rest for me.” I suppose I’d want to know what the suggested fixes are too.

I’ve only used grammarly a couple of times, but it might be an interesting place to learn a few tricks in this area…

2 Likes

On the flip side, here is what autocorrect does for me which I am missing in Bike currently:

  • It saves me from embarrassment by letting me know when I’ve made a mistake I did not intend. That’s a peace of mind I don’t have currently in Bike (especially important for things I may be sharing with others like a document or a message that I’m drafting in Bike).
1 Like

This will remain option for sure. I’m just talking about “if you have it enabled” case.

You might already know, but I think Bike has a pretty nice keyboard centric way to do this. Use Command-; to start a spell check/correct session in a panel. Use Up/Down arrow keys and Return to choose replacements. Use escape key to close checking panel.

1 Like

And my above changes/ideas to default behavior seem compatible with this goal … I think they do, just trying to get peoples opinions before I do implementation.

1 Like

I didn’t know that. I’ll go play with it now…

Just to be clear I don’t have this enabled in a Bike demo yet. I’m just talking about my ideas in this post (above in this thread) I'm looking for ideas to make autocorrect on macOS better - #3 by jessegrosjean

And thanks for your thought and feedback here! :slight_smile:

1 Like

Lots of cool considerations here that I’d not thought too much about. Jesse’s longer post made me realize some things about my own usage that I’d not realized previously (and thanks for the prompt to contribute).

To summarize, I realized I don’t care about the macOS popups at all, and do care a lot about the visibility of changes after I’ve finished writing a sentence (and the richer info on what happened in the contextual menu).

I think this means I align quite strongly with some of the suggestions Jesse is already proposing here. I would not be bothered if the popups went away entirely, and I would benefit from more visible (i.e. less erratic) highlighting/underlining of changes.

I think this opinion is because when I’m writing a sentence, I want to get it down as quickly as possible. As I’m doing that, I want autocorrect to catch any silly typos (i.e. like letter inversions) and, even more importantly for me, fire my Text Replacements specified in System Prefs. Autocorrecting my specified Text Replacements is a big deal for me, because most of what I write has repeated scientific names and terms in it, and I really don’t want to type those out every time.

But then once I’ve written the sentence, I’d love more reliable visibility as to what autocorrect did.

On the other side, the regular macOS autocorrect popups are useless to me. I don’t want to wait for them/mess with them as I’m trying to get a sentence down. I just want to write and then come back and edit later, and the popups are fairly useless for that. I’ll admit that I’d forgotten the undo autocorrect popup even exists until Jesse’s breakdown of its behavior here. When I want to undo an autocorrect, I do it after I’ve finished the sentence and then just use the contextual menu to read what the original text was and revert it (and as Jesse said, this does not trigger the popup).

I’d like to co-sign on the importance of Apple’s native Text Replacements. I use these frequently to supplement Apple’s native autocorrect engine. For typing specialized words more easily, and to make sure things are capitalized correctly. I’m using these lately as an alternative to apps like Typinator, and TextExpander, because while Apple’s implementation is less fully featured, it’s baked into the OS. It works everywhere, on all of my devices, and it doesn’t require third-party apps on iOS and iPadOS to implement something hacky to make it work. So my snippets work everywhere. Or almost everywhere, but it seems like maybe that might change someday when I update my favorite outliner.

I also use LanguageTool to help with my writing. I’m using it right now as I compose this message because of their browser extension. I’ve paid for the Premium version, too, and it’s a big part of my workflow. It has been ever since I learned that it was the tool behind the editing engine in Ulysses, where I prefer to write some of my long-form text. It’s also the engine behind my corrections in Obsidian, so it would be great if it could somehow play nice with Bike.

I’m making progress, still a ways to go. I do already have native text replacements expanding :slight_smile:

Interesting, I didn’t know that Ulysses used an external service. Are there any other Mac native apps that use alternatives to build in macOS spell/grammar checking?

It’s frustrating that macOS doesn’t include something more advanced like language tool or grammarly. I would like to plug into one of those services, but seems like quite a big and risky dependency + I would have to pay for usage if I’m reading API documentation right. For now I’m likely to just integrate just with macOS built in checkers.

1 Like

Thanks for posting that clip. I rarely use Text Edit and was unaware of that menu.
Jesse, if this is all that Bike ends up having, that would be fine with me.
I don’t like anything that distracts from thinking and writing, which is what Bike is for in the first place.
Errors in an outline are rarely important. Because you normally don’t share it. (Speaking for myself, anyway.)
In general, I think any kind of proofing should happen after writing, on demand. Otherwise it is a distraction.

1 Like