{"id":13661803,"url":"https://github.com/preservim/vim-litecorrect","last_synced_at":"2025-04-11T02:10:23.717Z","repository":{"id":12830534,"uuid":"15505894","full_name":"preservim/vim-litecorrect","owner":"preservim","description":"Lightweight auto-correction for Vim","archived":false,"fork":false,"pushed_at":"2022-02-13T13:23:46.000Z","size":36,"stargazers_count":108,"open_issues_count":3,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-24T23:35:17.105Z","etag":null,"topics":["prose","spellcheck","vim","vim-plugin","writing"],"latest_commit_sha":null,"homepage":null,"language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/preservim.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-29T08:46:00.000Z","updated_at":"2025-02-08T18:19:06.000Z","dependencies_parsed_at":"2022-08-30T14:10:45.688Z","dependency_job_id":null,"html_url":"https://github.com/preservim/vim-litecorrect","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preservim%2Fvim-litecorrect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preservim%2Fvim-litecorrect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preservim%2Fvim-litecorrect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preservim%2Fvim-litecorrect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preservim","download_url":"https://codeload.github.com/preservim/vim-litecorrect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248328160,"owners_count":21085261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["prose","spellcheck","vim","vim-plugin","writing"],"created_at":"2024-08-02T05:01:41.906Z","updated_at":"2025-04-11T02:10:23.698Z","avatar_url":"https://github.com/preservim.png","language":"Vim script","funding_links":[],"categories":["Vim script","Vim Script","plugins for writing"],"sub_categories":[],"readme":"# vim-litecorrect\n\n\u003e Lightweight auto-correction for Vim\n\nWe type `teh` when we meant to type `the`. This plugin is to help us catch\nthe most common of these typos and correct each upon hitting the space bar\n(or non-keyword character.)\n\nFeatures of this plugin:\n\n* Focused on the most common of typos\n* Pure Vimscript using the efficient `iabbrev`\n* Included auto-correct entries limited to 350 (in 2016) to ensure fast\n  loading (see expansion policy below)\n* Buffer-scoped behavior (won’t touch global settings)\n\nNote that this plugin is not intended to be a replacement for the spell\nchecker in Vim. It’s best used with spell-check enabled.\n\n## Expansion policy\n\nSince it was created in 2013, _litecorrect_ has limited the number of\ndefault auto-correct entries (such as `teh`-\u003e`the`) to 300, avoiding the\nexcessive load times of comparable plugins and focusing on the most common\nof typos.\n\nMeanwhile, the adoption of new disk technologies reduces the penalty we\npay when initializing plugins. This provides _litecorrect_ an opportunity\nto grow while not significantly impacting load-time performance.\n\nHenceforth, _litecorrect_ will expand by up to 50 entries each year. For\n2016 it will grow to 350 entries. For 2017, 400 entries, and so on.\n\n## Requirements\n\nMay require a recent version of Vim.\n\n## Installation\n\nYou can install _litecorrect_ using a Vim package manager, such as\n[Vundle][vnd], [Plug][plg], or [Pathogen][pth]. If you are using a recent\nverion of vim or neovim, you can also install using native package support.\n(See [:help packages][packages].)\n\n[vnd]: https://github.com/gmarik/Vundle.vim\n[plg]: https://github.com/junegunn/vim-plug\n[pth]: https://github.com/tpope/vim-pathogen\n[packages]: https://vimhelp.org/repeat.txt.html#packages\n\n## Configuration\n\nBecause you may not want auto-corrections in all file types you edit, you can\nconfigure this plugin per file type. For example, to enable litecorrect support\nin `markdown` and `textile` files, place in your `.vimrc`:\n\n  ```vim\n  set nocompatible\n  filetype plugin on       \" may already be in your .vimrc\n\n  augroup litecorrect\n    autocmd!\n    autocmd FileType markdown,mkd call litecorrect#init()\n    autocmd FileType textile call litecorrect#init()\n  augroup END\n  ```\n\nOptionally, you can build on the defaults by providing your own corrections.\nNote that the corrections are stored as key-value entries where the value is\na list of the common misspellings for the key.\n\n  ```\n  let user_dict = {\n    \\ 'maybe': ['mabye'],\n    \\ 'medieval': ['medival', 'mediaeval', 'medevil'],\n    \\ 'then': ['hten'],\n    \\ }\n  augroup litecorrect\n    autocmd!\n    autocmd FileType markdown call litecorrect#init(user_dict)\n    autocmd FileType textile call litecorrect#init(user_dict)\n  augroup END\n  ```\n\nThe corrections you provide will be in addition to the defaults. Where\nthere’s a conflict, your correction will prevail.\n\n### Correct previous misspelling\n\nTo augment _litecorrect_ you may find the following key mapping useful.\nIt forces the top-ranked correction on the first misspelled word\nbefore the cursor.\n\nAdd to your `.vimrc` with a key mapping of your choice:\n\n```vim\nnnoremap \u003cC-s\u003e [s1z=\u003cc-o\u003e\ninoremap \u003cC-s\u003e \u003cc-g\u003eu\u003cEsc\u003e[s1z=`]A\u003cc-g\u003eu\n```\n\nIt generates a fresh undo point prior to the correction so\nthat you can conveniently undo if necessary.\n\nNote that _litecorrect_ does not map any keys.\n\n### Typographic characters\n\nBy default, straight quotes will be used in corrections. For example:\n\n```\nIm -\u003e I'm\nshouldnt -\u003e shouldn't\nthats -\u003e that's\n```\n\nIf you prefer typographic (“curly”) quotes, install an educating quote plugin\nlike [vim-textobj-quote][qu] that will automatically transform straight quotes\nto curly ones in your typing, including your corrections. For example:\n\n```\nI'm -\u003e I’m\nshouldn't -\u003e shouldn’t\nthat's -\u003e that’s\n```\n\n## Criteria to add (or modify) default entries\n\nNote that the number of default entries will be limited for fast loading. See\npolicy above.\n\nSuggestions for improving the defaults are welcome, but good evidence is needed\nthat a suggested auto-correct entry adds value to the list.\n\n## Related projects\n\nIf load time performance isn’t an issue, you can seek a more comprehensive\napproach:\n\n* [wordlist.vim](https://github.com/vim-scripts/wordlist.vim) - nearly 800 entries\n* [vim-autocorrect](https://github.com/panozzaj/vim-autocorrect) - over 12K entries!\n\nAn alternative that builds on [tpope/vim-abolish][va]:\n\n* [vim-correction](https://github.com/jdelkins/vim-correction) - approx. 700 entries\n\n[va]: https://github.com/tpope/vim-abolish\n\n## See also\n\nIf you find this plugin useful, you may want to check out these others\noriginally by [@reedes][re]:\n\n* [vim-colors-pencil][cp] - color scheme for Vim inspired by IA Writer\n* [vim-lexical][lx] - building on Vim’s spell-check and thesaurus/dictionary completion\n* [vim-pencil][pn] - rethinking Vim as a tool for writers\n* [vim-textobj-quote][qu] - extends Vim to support typographic (‘curly’) quotes\n* [vim-textobj-sentence][ts] - improving on Vim's native sentence motion command\n* [vim-thematic][th] - modify Vim’s appearance to suit your task and environment\n* [vim-wheel][wh] - screen-anchored cursor movement for Vim\n* [vim-wordy][wo] - uncovering usage problems in writing\n* [vim-wordchipper][wc] - power tool for shredding text in Insert mode\n\n[re]: https://github.com/reedes\n[cp]: https://github.com/preservim/vim-colors-pencil\n[lx]: https://github.com/preservim/vim-lexical\n[vo]: https://github.com/preservim/vim-one\n[pn]: https://github.com/preservim/vim-pencil\n[ts]: https://github.com/preservim/vim-textobj-sentence\n[qu]: https://github.com/preservim/vim-textobj-quote\n[th]: https://github.com/preservim/vim-thematic\n[wh]: https://github.com/preservim/vim-wheel\n[wo]: https://github.com/preservim/vim-wordy\n[wc]: https://github.com/preservim/vim-wordchipper\n\n## Future development\n\nIf you’ve spotted a problem or have an idea on improving this plugin,\nplease post it to the [GitHub project issue page][issues].\n\n[issues]: https://github.com/preservim/vim-litecorrect/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreservim%2Fvim-litecorrect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreservim%2Fvim-litecorrect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreservim%2Fvim-litecorrect/lists"}