diff --git a/README.md b/README.md index fcd4f6c..70492d0 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/vim/quickly-fix-a-misspelled-word.md b/vim/quickly-fix-a-misspelled-word.md new file mode 100644 index 0000000..e5935e4 --- /dev/null +++ b/vim/quickly-fix-a-misspelled-word.md @@ -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.