Home

Awesome

correction.vim

When I type long prose in Microsft Word, I can do so without looking at the screen because many stupid spelling errors are fixed by the autocorrect system. Surely this system is not perfect, but it does catch some of the most insidious typographical errors. Vim is a much better enviornment for managing text, but I do miss this autocorrect feature. So, this plugin is an attempt to bring the MS Word autocorrect experience to Vim.

Features

Configuration

The variable g:correction_filetypes can be set to a list of filetypes in which to enable the abbreviations. For these filetypes, they will be installed on a buffer-local basis using autocmd FileType. The default value is as follows:

    let g:correction_filetypes = [
      \ 'text', 'markdown', 'gitcommit', 'plaintex', 'tex',
      \ 'latex', 'rst', 'asciidoc', 'textile', 'pandoc' ]

To enable the corrections for all filetypes (similar to the old default behavior), do this:

    let g:correction_filetypes = [ '*' ]

Installation

This plugin requires Tim Pope´s abolish.vim plugin. If it doesn´t find abolish.vim, then correction.vim will silently fail to load.

<details><summary>Expand for some installation options</summary>
    use {
      'jdelkins/vim-correction',
      requires = {'tpope/vim-abolish'},
    }
    Plug 'tpope/vim-abolish.git'
    Plug 'jdelkins/vim-correction.git'
    cd ~/.vim/bundle
    git clone git://github.com/tpope/vim-abolish.git
    git clone git://github.com/jdelkins/vim-correction.git
</details>

Turning off

    let g:loaded_correction = 1

License

Copyright © 2013-2021 Joel Elkins. Distributed under the same terms as Vim itself. See :help license.