Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Work with spelling errors. http://www.vim.org/scripts/script.php…
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Type||Name||Latest commit message||Commit time|
|Failed to load latest commit information.|
This is a mirror of http://www.vim.org/scripts/script.php?script_id=3844 DESCRIPTION Vim offers built-in spell checking; when you enable it via 'spell' and 'spelllang', you can jump to the highlighted spelling errors in the buffer via ]s. With spelling errors scattered across a large document, Vim does not provide an overview or report about the overall spell situation. This plugin populates the quickfix-list with all spelling errors found in a buffer to give you that overview. You can use the built-in quickfix features to navigate to the first occurrence of a particular spell error. You can also manage the spelling errors (mark as good / bad word, globally replace with suggestion) directly from the quickfix window via the usual zg, zw, z= etc. mappings. A typical workflow (e.g. when composing email, commit messages, or any form of documentation) includes writing and/or quitting the buffer, unless some remaining spelling errors require further intervention. This plugin offers auxiliary enhanced variants of :bdelete, :write and :quit that check for spelling errors and only execute the action if none were found. So by using these replacement commands, you'll never send or commit messages full of embarrassing typos any more! USAGE :[range]SpellCheck[!] Show all spelling errors as a quickfix list. For multiple occurrences of the same error, the first location and the number of occurrences is shown. If [!] is not given the first error is jumped to. In the quickfix list, spelling errors from other buffers are kept, so you can use something like :argdo SpellCheck to gather the spelling errors from multiple buffers. :[range]SpellLCheck[!] Same as :SpellCheck, except the location list for the current window is used instead of the quickfix list. MAPPINGS Inside the quickfix window, the following mappings are remapped so that they operate on the target spell error: zg, zG, zw, zW, zug, zuG, zuw, zuW, z=, u For z=, all identical misspellings in the buffer are replaced with the chosen suggestion (via :spellrepall). You can also quickly undo the last spell suggestion from the quickfix window (i.e. without switching to the target buffer) via u. For the other commands, the taken action is appended to the quickfix list entry, so that the list serves as a record of done actions (until you refresh the list with a new :SpellCheck). AUXILIARY COMMANDS The following set of commands just issue an error when spelling errors exist in the buffer or passed [range] of lines. :BDeleteUnlessSpellError[!] :bdelete the current buffer, unless it contains spelling errors. :WriteUnlessSpellError[!] [++opt] [file] :write the current buffer, unless it contains spelling errors. :WriteDeleteUnlessSpellError[!] [++opt] [file] :write and :bdelete the current buffer, unless it contains spelling errors. :XitUnlessSpellError[!] :write the current buffer and :quit, unless it contains spelling errors. :NextUnlessSpellError[!] [++opt] [file] Edit :next file, unless the current buffer contains spelling errors. This set of commands automatically opens the quickfix list in case of spelling error in the buffer or passed [range] of lines. :BDeleteOrSpellCheck[!] :bdelete the current buffer, or show the spelling errors in the quickfix list. :WriteOrSpellCheck[!] [++opt] [file] :write the current buffer, or show the spelling errors in the quickfix list. :WriteDeleteOrSpellCheck[!] [++opt] [file] :write and :bdelete the current buffer, or show the spelling errors in the quickfix list. :XitOrSpellCheck[!] :write the current buffer and :quit, or show the spelling errors in the quickfix list. :NextOrSpellCheck[!] [++opt] [file] Edit :next file, or show the current buffer's spelling errors in the quickfix list. :UpdateAndSpellCheck[!] :update the current buffer, and show any spelling errors in the quickfix list. A [!] is passed to the :write / :bdelete / :quit commands.