Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Grammar checker for English, French, German (etc.) in Vim

tag: 0.8

Fetching latest commit…

Cannot retrieve the latest commit at this time

This is a mirror of

This plugin integrates the LanguageTool grammar checker into Vim.
Current version of LanguageTool can check grammar in many languages: 
en, de, pl, fr, es, it, nl, lt, uk, ru, sk, sl, sv, ro, is, gl, ca, da, ml, be.
See for more information about LanguageTool.

The script defines 2 commands:

* Use  :LanguageToolCheck  to check grammar in current buffer.
  This will check for grammar mistakes in text of current buffer 
  and highlight the errors.  It also opens a new scratch window with the
  list of grammar mistakes with further explanations for each error.
  Pressing <Enter> or clicking on an error in scratch buffer will jump
  to that error.  The location list for the buffer being checked
  is also populated.  So you can use location commands such as
  :lopen to open the location list window, :lne to jump to the 
  next error, etc. The :LanguageToolCheck command accepts a
  range. You can for example check grammar between lines
  100 and 200 in buffer with :100,200LanguageToolCheck.

* Use  :LanguageToolClear  to remove highlighting of grammatical errors
  and close the scratch window containing the list of errors.

See screenshots of grammar checking in English and French at:

You can customize this plugin by setting the following variables in 
your ~/.vimrc (plugin already sets default values).

      This variable specifies the location of the LanguageTool java
      grammar checker program.
      Default is: $HOME/JLanguageTool/dist/LanguageTool.jar

      This variable specifies checker rules which are disabled.
      Each disabled rule must be comma separated

      This variable specifies the height of the scratch window which 
      contains all grammatical mistakes with some explanations. You 
      can use a negative value to disable opening the scratch window.
      Default is: 14

You can also customize the following syntax highlighting groups:

Language is selected automatically from the Vim 'spelllang' option.
Character encoding is selected automatically from the Vim 'fenc' option
or from 'enc' option if 'fenc' is empty.

  Column number reported by LanguageTool indicating the location of the 
  error is sometimes incorrect. There is an opened ticket about this bug: 
  The script currently works around it by doing pattern matching with  
  information context but it is not a perfect workaround: it can cause 
  spurious highlighting of errors in rare cases.

  The VIM LICENSE applies to LanguageTool.vim plugin
  (see ":help copyright" except use "LanguageTool.vim" instead of Vim").
Something went wrong with that request. Please try again.