refactor: finish moving ssh-* scripts to own installers
[webi-installers/.git] / vim-spell / README.md
1 ---
2 title: vim-spell
3 homepage: https://webinstall.dev/vim-spell
4 tagline: |
5   vim spell is Vim's built-in spellcheck
6 ---
7
8 To update (replacing the current version) run `webi vim-spell`.
9
10 ## Cheat Sheet
11
12 Vim has a built-in spell checker. It is turned off by default and when turned on
13 will do whole-word highlighting - which does not look good in any of the themes
14 a I use.
15
16 This vim-spell plugin turns on the spell checker and sets it to use underline
17 rather than background coloring.
18
19 ### How to add new words
20
21 The vim command to add words to your user's dictionary is `:spell <word>`. For
22 example:
23
24 ```vim
25 :spell JSON
26 :spell HTML
27 ```
28
29 ### How to remove words
30
31 You can remove a word from your custom dictionary with `:spellundo <word>`, like
32 so:
33
34 ```vim
35 :spellundo referer
36 ```
37
38 You can blacklist word (mark it as an incorrect spelling) with
39 `:spellwrong <word>`, like this:
40
41 ```vim
42 :spellwrong writeable
43
44 " use X11/HTML-defined 'gray', not the proper English 'grey'
45 :spellwrong grey
46 ```
47
48 This is particularly useful if you want to make sure that you're consintent in
49 spelling words that have multiple spellings.
50
51 ### Where are the custom files?
52
53 Your user-specific spell files in in `~/.vim/spell`. One is in binary form and
54 the other in text form, likely:
55
56 - `~/.vim/spell/en.utf-8.add`
57 - `~/.vim/spell/en.utf-8.add.spl`
58
59 ### How to install manually
60
61 Create the file `~/.vim/plugins/spell.vim`. Add the same contents as
62 <https://github.com/webinstall/webi-installers/blob/master/vim-spell/spell.vim>.
63
64 That will look something like this:
65
66 ```vim
67 " turn on spellcheck
68 set spell
69
70 " set spellcheck highlight to underline
71 hi clear SpellBad
72 hi SpellBad cterm=underline
73 ```
74
75 You'll then need to update `~/.vimrc` to source that plugin:
76
77 ```vim
78 " Spell Check: reasonable defaults from webinstall.dev/vim-spell
79 source ~/.vim/plugins/spell.vim
80 ```