Skip to content

Commit d01f57b

Browse files
committedFeb 28, 2021
Add Quickly Fix A Misspelled Word as a Vim til
1 parent 59e1c71 commit d01f57b

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed
 

‎README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
1010

1111
For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud).
1212

13-
_1064 TILs and counting..._
13+
_1065 TILs and counting..._
1414

1515
---
1616

@@ -1171,6 +1171,7 @@ _1064 TILs and counting..._
11711171
- [Quick File Info](vim/quick-file-info.md)
11721172
- [Quick Man Pages](vim/quick-man-pages.md)
11731173
- [Quick Quickfix List Navigation](vim/quick-quickfix-list-navigation.md)
1174+
- [Quickly Fix A Misspelled Word](vim/quickly-fix-a-misspelled-word.md)
11741175
- [Quickly Switch To A Buffer By Number](vim/quickly-switch-to-a-buffer-by-number.md)
11751176
- [Quit When There Is An Argument List](vim/quit-when-there-is-an-argument-list.md)
11761177
- [Re-indenting Your Code](vim/reindenting-your-code.md)

‎vim/quickly-fix-a-misspelled-word.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Quickly Fix A Misspelled Word
2+
3+
In [Fix The Spelling Of A Word](fix-the-spelling-of-a-word.md), I describe how
4+
to use Vim's built-in spell files to fix a misspelling. After turning on
5+
`:spell` and navigating the cursor to a typo, you can open a prompt with dozens
6+
of spelling replacement options.
7+
8+
You generally don't need dozens of options to choose from. If you were remotely
9+
close in the spelling of the word, you will likely end up choosing the first
10+
option.
11+
12+
Instead of the multi-step open and choose, you can tell Vim to replace the
13+
misspelled word with its top suggestion.
14+
15+
Navigate the cursor over the misspelled word and hit:
16+
17+
```
18+
1z=
19+
```
20+
21+
This skips the prompt and tells Vim to grab the first spelling suggestion.
22+
23+
If it's not what you were looking for, you can always hit `u` (to undo) and
24+
then `z=` to open the full prompt.
25+
26+
See `:h z=` for more details.

0 commit comments

Comments
 (0)