reimplement and expand word list

This commit is contained in:
Reed Esau
2014-01-20 22:40:13 -07:00
parent bc9b19f68f
commit 08b28f7e10
3 changed files with 422 additions and 74 deletions

View File

@@ -11,26 +11,11 @@ Features of this plugin:
* Focused on the most common of typos that we make
* Uses Vims `iabbrev`
* Buffer-scoped behavior
* User-extensible
* User-extensible
* Limited to a maximum of 500 `iabbrev`s for quick load (currently at ~450)
Note that this plugin is not a replacement for teh spell checker in Vim.
The default typos and their corrections are stored in a global dictionary:
```
let g:litecorrect#defaults =
\{'I' : ['i'],
\ 'The' : ['TEh', 'Teh'],
\ 'that' : ['htat'],
\ 'the' : ['hte', 'teh'],
\ 'this' : ['htis'],
\ 'then' : ['tehn'],
\ 'what' : ['waht'],
\}
```
Note that the corrections are stored as key-value entries where the value
is a list of the common misspellings for the key.
Note that this plugin is not intended to be a replacement for teh spell
checker in Vim. Its best used with spell-check enabled.
## Requirements
@@ -60,7 +45,9 @@ in `markdown` and `textile` files, place in your `.vimrc`:
augroup END
```
Alternatively, you can build on the defaults by providing your own corrections:
Alternatively, you can build on the defaults by providing your own
corrections. Note that the corrections are stored as key-value entries
where the value is a list of the common misspellings for the key.
```
let user_dict = {
@@ -75,32 +62,41 @@ Alternatively, you can build on the defaults by providing your own corrections:
augroup END
```
The corrections you provide will be in addition to those in those in
`g:litecorrect#defaults`. Where theres a conflict, your correction will
prevail.
The corrections you provide will be in addition to the defaults. Where
theres a conflict, your correction will prevail.
## Criteria to add to defaults
Suggestions for adding to the defaults are welcome, but good evidence is
needed that they are common typos.
Short words are preferable to long words to avoid the list becoming too
large and slow to load.
Note that existing `iabbrev`s may be removed to make way for new ones, to
keep within the stated limit.
## Related
For a more comprehensive approach, check out
[vim-autocorrect](https://github.com/panozzaj/vim-autocorrect).
For a more comprehensive approach with support for many more words, check
out:
* [vim-autocorrect](https://github.com/panozzaj/vim-autocorrect)
* [wordlist.vim](https://github.com/vim-scripts/wordlist.vim)
## See also
If you find this plugin useful, you may want to check out these others by
the same author:
[@reedes][re]:
* [vim-colors-pencil][cp] color scheme for Vim inspired by IA Writer
* [vim-colors-pencil][cp] - color scheme for Vim inspired by IA Writer
* [vim-lexical][lx] - building on Vims spell-check and thesaurus/dictionary completion
* [vim-pencil][pn] - rethinking Vim as a tool for writers
* [vim-quotable][qu] - Extends Vim to support typographic (curly) quotes
* [vim-thematic][th] modify Vims appearance to suit your task and environment
* [vim-quotable][qu] - extends Vim to support typographic (curly) quotes
* [vim-thematic][th] - modify Vims appearance to suit your task and environment
* [vim-wordy][wo] - uncovering usage problems in writing
[re]: http://github.com/reedes
[cp]: http://github.com/reedes/vim-colors-pencil
[lx]: http://github.com/reedes/vim-lexical
[pn]: http://github.com/reedes/vim-pencil
@@ -113,4 +109,3 @@ the same author:
If youve spotted a problem or have an idea on improving this plugin,
please post it to the github project issue page.
<!-- vim: set tw=74 :-->