Allow for expansion of default entries #5

This commit is contained in:
Reed Esau
2015-12-25 13:59:49 -07:00
parent d8a55e73ee
commit c348095afc
2 changed files with 29 additions and 9 deletions

View File

@@ -10,12 +10,27 @@ Features of this plugin:
* Focused on the most common of typos * Focused on the most common of typos
* Pure Vimscript using the efficient `iabbrev` * Pure Vimscript using the efficient `iabbrev`
* Included auto-correct entries limited to 300 for fast loading * Included auto-correct entries limited to 350 (in 2016) to ensure fast
loading (see **new** expansion policy below)
* Buffer-scoped behavior (wont touch global settings) * Buffer-scoped behavior (wont touch global settings)
Note that this plugin is not intended to be a replacement for teh spell Note that this plugin is not intended to be a replacement for teh spell
checker in Vim. Its best used with spell-check enabled. checker in Vim. Its best used with spell-check enabled.
## Expansion policy (**NEW**)
Since it was created in 2013, _litecorrect_ has limited the number of
default auto-correct entries (such as `teh`->`the`) to 300, avoiding the
excessive load times of comparable plugins and focusing on the most common
of typos.
Meanwhile, the adoption of new disk technologies reduces the penalty we
pay when initializing plugins. This provides _litecorrect_ an opportunity
to grow while not significantly impacting load-time performance.
Henceforth, _litecorrect_ will expand by up to 50 entries each year. For
2016 it will grow to 350 entries. For 2017, 400 entries, and so on.
## Requirements ## Requirements
May require a recent version of Vim. May require a recent version of Vim.
@@ -100,7 +115,7 @@ shouldn't -> shouldnt
that's -> thats that's -> thats
``` ```
## Criteria to modify default entries ## Criteria to add (or modify) default entries
Note that the number of default entries will be limited to 300 for fast Note that the number of default entries will be limited to 300 for fast
loading. loading.
@@ -111,16 +126,17 @@ will replace.
## Related projects ## Related projects
For a more comprehensive approach with _many_ more entries, check out: If load time performance isnt an issue, you may seek a more
comprehensive approach:
* [wordlist.vim](https://github.com/vim-scripts/wordlist.vim) - nearly 800 entries * [wordlist.vim](https://github.com/vim-scripts/wordlist.vim) - nearly 800 entries
* [vim-autocorrect](https://github.com/panozzaj/vim-autocorrect) - over 12K entries! * [vim-autocorrect](https://github.com/panozzaj/vim-autocorrect) - over 12K entries!
A warning that larger entry counts make for slower loading. An alternative that builds on [tpope/vim-abolish][va]:
Another approach that builds on [tpope/vim-abolish]: * [vim-correction](https://github.com/jdelkins/vim-correction) - approx. 700 entries
* [vim-correction](https://github.com/jdelkins/vim-correction) [va]: http://github.com/tpope/vim-abolish
## See also ## See also

View File

@@ -119,6 +119,7 @@ function! litecorrect#init(...)
ia <buffer> hsi his ia <buffer> hsi his
ia <buffer> htat that ia <buffer> htat that
ia <buffer> hte the ia <buffer> hte the
ia <buffer> htem them
ia <buffer> hten then ia <buffer> hten then
ia <buffer> htere there ia <buffer> htere there
ia <buffer> htese these ia <buffer> htese these
@@ -173,6 +174,7 @@ function! litecorrect#init(...)
ia <buffer> mkea make ia <buffer> mkea make
ia <buffer> moeny money ia <buffer> moeny money
ia <buffer> mroe more ia <buffer> mroe more
ia <buffer> msut must
ia <buffer> mysefl myself ia <buffer> mysefl myself
ia <buffer> myu my ia <buffer> myu my
ia <buffer> nad and ia <buffer> nad and
@@ -235,6 +237,7 @@ function! litecorrect#init(...)
ia <buffer> thast that ia <buffer> thast that
ia <buffer> thats that's ia <buffer> thats that's
ia <buffer> thatthe that the ia <buffer> thatthe that the
ia <buffer> theh then
ia <buffer> theri their ia <buffer> theri their
ia <buffer> thgat that ia <buffer> thgat that
ia <buffer> thge the ia <buffer> thge the
@@ -312,6 +315,7 @@ function! litecorrect#init(...)
ia <buffer> yaer year ia <buffer> yaer year
ia <buffer> yera year ia <buffer> yera year
ia <buffer> yoiu you ia <buffer> yoiu you
ia <buffer> yoru your
ia <buffer> youare you are ia <buffer> youare you are
ia <buffer> youre you're ia <buffer> youre you're
ia <buffer> youve you've ia <buffer> youve you've