October 2015
Intermediate to advanced
356 pages
7h 54m
English
| Tip 123 | Fix Spelling Errors from Insert Mode |
Vim’s spelling autocompletion allows us to fix typos without even having to leave Insert mode.
Picture this: we’ve just typed a line of text, and then we realize that there’s a spelling mistake a few words back. What can we do?
This technique depends on having the spell checker enabled:
| => | :set spell |
To fix the mistake, we could switch to Normal mode, use the [s command to jump back to the spelling mistake, and then use 1z= to fix it. Having made the correction, we could then switch back to Insert mode with the A command, continuing where we left off.
Alternatively, we could fix the error from Insert ...