mirror of
https://github.com/preservim/vim-litecorrect.git
synced 2025-11-12 03:43:47 -05:00
Simplified by removing curly-quote support
Such support is best provided by an educating quote plugin.
This commit is contained in:
@@ -64,24 +64,24 @@ there’s a conflict, your correction will prevail.
|
||||
|
||||
### Typographic characters
|
||||
|
||||
By default, typographic (or curly) quotes will be used in corrections. For
|
||||
example:
|
||||
By default, straight quotes will be used in corrections. For example:
|
||||
|
||||
```
|
||||
Im -> I’m
|
||||
shouldnt -> shouldn’t
|
||||
thats -> that’s
|
||||
Im -> I'm
|
||||
shouldnt -> shouldn't
|
||||
thats -> that's
|
||||
```
|
||||
|
||||
If you prefer straight quotes, change this setting to 0 in your `.vimrc`:
|
||||
If you prefer typographic (“curly”) quotes, install an educating quote plugin
|
||||
like [vim-textobj-quote][qu] that will automatically transform straight quotes
|
||||
to curly ones in your typing, including your corrections. For example:
|
||||
|
||||
```
|
||||
let g:litecorrect#typographic = 1 " 0=disable, 1=enable (def)
|
||||
I'm -> I’m
|
||||
shouldn't -> shouldn’t
|
||||
that's -> that’s
|
||||
```
|
||||
|
||||
Note that an educating quote plugin like [vim-textobj-quote][qu] will
|
||||
automatically transform straight quotes to curly ones in your corrections.
|
||||
|
||||
## Criteria to modify default entries
|
||||
|
||||
Note that the number of default entries will be limited to 300 for fast
|
||||
@@ -96,7 +96,7 @@ will replace.
|
||||
For a more comprehensive approach with _many_ more entries, check out:
|
||||
|
||||
* [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.
|
||||
|
||||
@@ -107,13 +107,13 @@ If you find this plugin useful, you may want to check out these others by
|
||||
|
||||
* [vim-colors-pencil][cp] - color scheme for Vim inspired by IA Writer
|
||||
* [vim-lexical][lx] - building on Vim’s spell-check and thesaurus/dictionary completion
|
||||
* [vim-one][vo] - make use of Vim’s _+clientserver_ capabilities
|
||||
* [vim-one][vo] - make use of Vim’s _+clientserver_ capabilities
|
||||
* [vim-pencil][pn] - rethinking Vim as a tool for writers
|
||||
* [vim-textobj-quote][qu] - extends Vim to support typographic (‘curly’) quotes
|
||||
* [vim-textobj-sentence][ts] - improving on Vim's native sentence motion command
|
||||
* [vim-thematic][th] - modify Vim’s appearance to suit your task and environment
|
||||
* [vim-thematic][th] - modify Vim’s appearance to suit your task and environment
|
||||
* [vim-wheel][wh] - screen-anchored cursor movement for Vim
|
||||
* [vim-wordy][wo] - uncovering usage problems in writing
|
||||
* [vim-wordy][wo] - uncovering usage problems in writing
|
||||
|
||||
[re]: http://github.com/reedes
|
||||
[cp]: http://github.com/reedes/vim-colors-pencil
|
||||
|
||||
@@ -18,13 +18,12 @@ function! s:unicode_enabled()
|
||||
endfunction
|
||||
|
||||
function! litecorrect#init(...)
|
||||
ia <buffer> Im I'm
|
||||
ia <buffer> TEh The
|
||||
ia <buffer> Teh The
|
||||
ia <buffer> abotu about
|
||||
ia <buffer> acn can
|
||||
ia <buffer> adn and
|
||||
ia <buffer> anf and
|
||||
ia <buffer> ans and
|
||||
ia <buffer> agian again
|
||||
ia <buffer> ahppen happen
|
||||
ia <buffer> ahve have
|
||||
@@ -46,7 +45,9 @@ function! litecorrect#init(...)
|
||||
ia <buffer> amkes makes
|
||||
ia <buffer> andteh and the
|
||||
ia <buffer> andthe and the
|
||||
ia <buffer> anf and
|
||||
ia <buffer> anothe another
|
||||
ia <buffer> ans and
|
||||
ia <buffer> arond around
|
||||
ia <buffer> asthe as the
|
||||
ia <buffer> atthe at the
|
||||
@@ -77,15 +78,19 @@ function! litecorrect#init(...)
|
||||
ia <buffer> comtain contain
|
||||
ia <buffer> comtains contains
|
||||
ia <buffer> coudl could
|
||||
ia <buffer> couldnt couldn't
|
||||
ia <buffer> couldthe could the
|
||||
ia <buffer> cpoy copy
|
||||
ia <buffer> deatils details
|
||||
ia <buffer> didnot did not
|
||||
ia <buffer> didnt didn't
|
||||
ia <buffer> doese does
|
||||
ia <buffer> doesnt doesn't
|
||||
ia <buffer> doign doing
|
||||
ia <buffer> doimg doing
|
||||
ia <buffer> donid doing
|
||||
ia <buffer> donig doing
|
||||
ia <buffer> dont don't
|
||||
ia <buffer> efel feel
|
||||
ia <buffer> ehr her
|
||||
ia <buffer> esle else
|
||||
@@ -112,6 +117,7 @@ function! litecorrect#init(...)
|
||||
ia <buffer> hadbeen had been
|
||||
ia <buffer> haev have
|
||||
ia <buffer> hasbeen has been
|
||||
ia <buffer> hasnt hasn't
|
||||
ia <buffer> havebeen have been
|
||||
ia <buffer> haveing having
|
||||
ia <buffer> hda had
|
||||
@@ -184,6 +190,7 @@ function! litecorrect#init(...)
|
||||
ia <buffer> oneof one of
|
||||
ia <buffer> onthe on the
|
||||
ia <buffer> onyl only
|
||||
ia <buffer> ot to
|
||||
ia <buffer> otehr other
|
||||
ia <buffer> otu out
|
||||
ia <buffer> outof out of
|
||||
@@ -207,6 +214,7 @@ function! litecorrect#init(...)
|
||||
ia <buffer> seh she
|
||||
ia <buffer> shesaid she said
|
||||
ia <buffer> shoudl should
|
||||
ia <buffer> shouldnt shouldn't
|
||||
ia <buffer> showinf showing
|
||||
ia <buffer> simalar similar
|
||||
ia <buffer> similiar similar
|
||||
@@ -234,10 +242,13 @@ function! litecorrect#init(...)
|
||||
ia <buffer> tghe the
|
||||
ia <buffer> tghis this
|
||||
ia <buffer> thansk thanks
|
||||
ia <buffer> thats that's
|
||||
ia <buffer> thatthe that the
|
||||
ia <buffer> thenew the new
|
||||
ia <buffer> theri their
|
||||
ia <buffer> thesame the same
|
||||
ia <buffer> theyll they'll
|
||||
ia <buffer> theyve they've
|
||||
ia <buffer> thgat that
|
||||
ia <buffer> thge the
|
||||
ia <buffer> thier their
|
||||
@@ -258,7 +269,6 @@ function! litecorrect#init(...)
|
||||
ia <buffer> tkae take
|
||||
ia <buffer> tkaes takes
|
||||
ia <buffer> tkaing taking
|
||||
ia <buffer> ot to
|
||||
ia <buffer> todya today
|
||||
ia <buffer> tothe to the
|
||||
ia <buffer> towrad toward
|
||||
@@ -271,6 +281,7 @@ function! litecorrect#init(...)
|
||||
ia <buffer> veyr very
|
||||
ia <buffer> vrey very
|
||||
ia <buffer> waht what
|
||||
ia <buffer> wasnt wasn't
|
||||
ia <buffer> watn want
|
||||
ia <buffer> wehn what
|
||||
ia <buffer> werre were
|
||||
@@ -294,6 +305,7 @@ function! litecorrect#init(...)
|
||||
ia <buffer> wokr work
|
||||
ia <buffer> woudl would
|
||||
ia <buffer> wouldbe would be
|
||||
ia <buffer> wouldnt wouldn't
|
||||
ia <buffer> wrod word
|
||||
ia <buffer> wroet wrote
|
||||
ia <buffer> wtih with
|
||||
@@ -302,40 +314,11 @@ function! litecorrect#init(...)
|
||||
ia <buffer> yera year
|
||||
ia <buffer> yoiu you
|
||||
ia <buffer> youare you are
|
||||
ia <buffer> youve you've
|
||||
ia <buffer> ytou you
|
||||
ia <buffer> yuo you
|
||||
ia <buffer> yuor your
|
||||
|
||||
if s:unicode_enabled() && g:litecorrect#typographic
|
||||
ia <buffer> Im I’m
|
||||
ia <buffer> couldnt couldn’t
|
||||
ia <buffer> didnt didn’t
|
||||
ia <buffer> doesnt doesn’t
|
||||
ia <buffer> dont don’t
|
||||
ia <buffer> hasnt hasn’t
|
||||
ia <buffer> shouldnt shouldn’t
|
||||
ia <buffer> thats that’s
|
||||
ia <buffer> theyll they’ll
|
||||
ia <buffer> theyve they’ve
|
||||
ia <buffer> wasnt wasn’t
|
||||
ia <buffer> wouldnt wouldn’t
|
||||
ia <buffer> youve you’ve
|
||||
else
|
||||
ia <buffer> Im I'm
|
||||
ia <buffer> couldnt couldn't
|
||||
ia <buffer> didnt didn't
|
||||
ia <buffer> doesnt doesn't
|
||||
ia <buffer> dont don't
|
||||
ia <buffer> hasnt hasn't
|
||||
ia <buffer> shouldnt shouldn't
|
||||
ia <buffer> thats that's
|
||||
ia <buffer> theyll they'll
|
||||
ia <buffer> theyve they've
|
||||
ia <buffer> wasnt wasn't
|
||||
ia <buffer> wouldnt wouldn't
|
||||
ia <buffer> youve you've
|
||||
endif
|
||||
|
||||
" user overrides
|
||||
let l:user_dict = a:0 ? a:1 : {}
|
||||
for l:item in items(l:user_dict)
|
||||
|
||||
@@ -13,10 +13,6 @@ let g:loaded_litecorrect = 1
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if !exists('g:litecorrect#typographic')
|
||||
let g:litecorrect#typographic = 1 " 0=disable, 1=enable
|
||||
endif
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" vim:ts=2:sw=2:sts=2
|
||||
|
||||
Reference in New Issue
Block a user