Sublime Forum

Microsoft Word Auto Correct

#1

i use sublime for both code and prose.
i love microsoft word’s auto correct feature, although it sucks as a general editor.

basically if you have been typing a lot you might develop carpal tunnel. and when writing documents or emails, microsoft’s auto correct saves you from using the shift key to capitalize the first word and you dont have to type a lot of punctuation except commas and fullstops.

for example, if you type this in word

i dont have a lot to say about taht, but waht you said is ok.

you get

I don’t have a lot to say about that, but what you said is ok.

it does a fine job of saving you from pressing the stressful keys and also correct a lot of common errors when you’re typing fast.

you can also easily export the auto correction list from word

if this can be done in a package, it would be okay as well.

thoughts?

0 Likes

#2

I think auto-correct should be possible because we can use

compDefault = [view.extract_completions(prefix)]

to obtain the default word-completions. We could use on_modified to read, and replace, the word to the left, scope for plain text (or whatever scope is required), and possibly disable the completions-list so that they don’t conflict.

I can foresee issues:
Replacing text would trigger another on_modified event (circular call);
Undo/Redo might cause issues;
How would we persuade ST not to use auto-correct at particular times?

Just some ideas, but it is not something I will be pursuing myself, Sorry. Andy.

0 Likes

#3

Breevy [16software.com/breevy/], which is a text expander, provides similar functionality and of course, will work in any app and you can import Word’s autocorrect completions into it. Alternatively, if you’re an AutoHotKey user, there’s a word list here that’ll get you started: autohotkey.com/download/AutoCorrect.ahk

If you’re on a Mac, have a look at TextExpander

Cheers,
Mick

0 Likes