mirror of
https://github.com/jbranchaud/til
synced 2026-01-02 22:58:01 +00:00
Add Quickly Fix A Misspelled Word as a Vim til
This commit is contained in:
@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
|
||||
|
||||
For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud).
|
||||
|
||||
_1064 TILs and counting..._
|
||||
_1065 TILs and counting..._
|
||||
|
||||
---
|
||||
|
||||
@@ -1171,6 +1171,7 @@ _1064 TILs and counting..._
|
||||
- [Quick File Info](vim/quick-file-info.md)
|
||||
- [Quick Man Pages](vim/quick-man-pages.md)
|
||||
- [Quick Quickfix List Navigation](vim/quick-quickfix-list-navigation.md)
|
||||
- [Quickly Fix A Misspelled Word](vim/quickly-fix-a-misspelled-word.md)
|
||||
- [Quickly Switch To A Buffer By Number](vim/quickly-switch-to-a-buffer-by-number.md)
|
||||
- [Quit When There Is An Argument List](vim/quit-when-there-is-an-argument-list.md)
|
||||
- [Re-indenting Your Code](vim/reindenting-your-code.md)
|
||||
|
||||
26
vim/quickly-fix-a-misspelled-word.md
Normal file
26
vim/quickly-fix-a-misspelled-word.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Quickly Fix A Misspelled Word
|
||||
|
||||
In [Fix The Spelling Of A Word](fix-the-spelling-of-a-word.md), I describe how
|
||||
to use Vim's built-in spell files to fix a misspelling. After turning on
|
||||
`:spell` and navigating the cursor to a typo, you can open a prompt with dozens
|
||||
of spelling replacement options.
|
||||
|
||||
You generally don't need dozens of options to choose from. If you were remotely
|
||||
close in the spelling of the word, you will likely end up choosing the first
|
||||
option.
|
||||
|
||||
Instead of the multi-step open and choose, you can tell Vim to replace the
|
||||
misspelled word with its top suggestion.
|
||||
|
||||
Navigate the cursor over the misspelled word and hit:
|
||||
|
||||
```
|
||||
1z=
|
||||
```
|
||||
|
||||
This skips the prompt and tells Vim to grab the first spelling suggestion.
|
||||
|
||||
If it's not what you were looking for, you can always hit `u` (to undo) and
|
||||
then `z=` to open the full prompt.
|
||||
|
||||
See `:h z=` for more details.
|
||||
Reference in New Issue
Block a user