Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lermit committed Feb 10, 2012
0 parents commit 99cce0a
Show file tree
Hide file tree
Showing 19 changed files with 3,136 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .netrwhist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhist_cnt =2
let g:netrw_dirhist_1='/usr/share/gnome-shell/theme'
let g:netrw_dirhist_2='/home/romain/.vim'
231 changes: 231 additions & 0 deletions doc/LanguageTool.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
*LanguageTool.txt* A grammar checker in Vim for English, French, German, etc.
*LanguageTool*

Author: Dominique Pellé <[email protected]>
Last Change: 27 Mar 2011

For Vim version 7.0 and above

============================================================================

1. Overview |languagetool-overview|
2. Screenshots |languagetool-screenshots|
3. Download |languagetool-download|
4. Installation |languagetool-installation|
5. Configuration |languagetool-configuration|
6. Features |languagetool-features|
7. Bugs |languagetool-bugs|
8. License |languagetool-license|

============================================================================

1. Overview *languagetool-overview*

This plugin integrates LanguageTool into Vim. LanguageTool is an Open Source
style and grammar checker for English, French, German, Polish, Dutch,
Romanian and many other languages. LanguageTool detects grammar mistakes
that a spelling checker cannot detect. LanguageTool does not do spelling
checking. Vim builtin spelling checker can of course be used along with
LanguageTool.

See http://www.languagetool.org/ for more information about LanguageTool.

============================================================================

2. Screenshots *languagetool-screenshots*

If you don't have time to read help files, these screenshots will give you
an idea of what the LanguageTool plugin does:

http://dominique.pelle.free.fr/pic/LanguageToolVimPlugin_en.png
http://dominique.pelle.free.fr/pic/LanguageToolVimPlugin_fr.png

============================================================================

3. Download *languagetool-download*

You can download the latest version of this plugin from:

http://www.vim.org/scripts/script.php?script_id=3223

LanguageTool can be downloaded from:

http://www.languagetool.org/

============================================================================

4. Installation *languagetool-installation*

4.1 Installing the plugin~

Unzip file LanguageTool.zip in your personal |vimfiles| directory (~/.vim
under Unix or %HOMEPATH%\vimfiles under Windows): >
$ mkdir ~/.vim
$ cd ~/.vim
$ unzip /path-to/LanguageTool.zip
$ vim -c 'helptags ~/.vim/doc'
The zip file contains files: >
plugin/LanguageTool.vim
doc/LanguageTool.vim
You have to enable plugins by adding these two lines in your |.vimrc| file: >
set nocompatible
filetype plugin on
4.2 Installing LanguageTool~

To use this plugin, you need to install the Java LanguageTool program. You
can choose to:

* download the LanguageTool plugin for OpenOffice;
* or checkout and build the latest LanguageTool from sources in subversion.

Downloading the OpenOffice plugin is simpler, but building LanguageTool
from sources ensures that you get the latest version.

4.2.1 Download LanguageTool plugin for OpenOffice~

Download the OpenOffice LanguageTool plugin file LanguageTool-*.oxt and
unzip it: >
$ wget http://www.languagetool.org/download/LanguageTool-1.3.oxt
$ unzip LanguageTool-1.3.oxt
This should extract LanguageTool.jar among several other files.

You may find more recent development snapshots at:

http://www.languagetool.org/download/

4.2.2 Build LanguageTool from sources in Subversion

If you prefer to build LanguageTool yourself from sources, you first need
to install the pre-requisite packages. On Ubuntu, you need to install the
following packages: >
$ sudo apt-get install sun-java6-jdk ant subversion
LanguageTool can then be downloaded and built as follows: >
$ svn co https://languagetool.svn.sourceforge.net/svnroot/languagetool/trunk/JLanguageTool languagetool
$ cd languagetool
$ ant
This should build janguagetool/dist/LanguageTool.jar.

============================================================================

5. Configuration *languagetool-configuration*

LanguageTool plugin uses character encoding from the 'fenc' option or from
the 'enc' option if 'fenc' is empty.

The language used for grammar checking is automatically selected from the
'spelllang' Vim option. If 'spelllang' option is empty, English (en) is
used by default.

Several global variables can be set in your |vimrc| to configure the behavior
of the LanguageTool plugin.

g:languagetool_jar *g:languagetool_jar*

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

g:languagetool_disable_rules *g:languagetool_disable_rules*

This variable specifies checker rules which are disabled. Each disabled
rule must be comma separated.
Default is: WHITESPACE_RULE,EN_QUOTES

g:languagetool_win_height *g:languagetool_win_height*

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. You can also make it empty ''
to let Vim pick a default size.
Default is: 14

You can also customize the following syntax highlighting groups: >
LanguageToolError
LanguageToolCmd
LanguageToolLabel
LanguageToolErrorCount
============================================================================

6. Features *languagetool-features*

The LanguageTool plugin defines 2 commands |:LanguageToolCheck| and
|:LanguageToolClean|.

:LanguageToolCheck *:LanguageToolCheck*

Use the |:LanguageToolCheck| command to check the grammar in the current
buffer. This will highlight errors in the buffer. It will also open a new
scratch window with the list of grammar mistakes with further explanations
for each error. It also populates the location-list for the window.

The |:LanguageToolCheck| command accepts a range. You can for example check
grammar between lines 100 and 200 in buffer with :100,200LanguageToolCheck,
check grammar in the visual selection with :<',>'LanguageToolCheck, etc.
The default range is 1,$ (whole buffer).

:LanguageToolClear *:LanguageToolClear*

Use the |:LanguageToolClear| command to clear highlighting of grammar
mistakes, close the scratch window containing the list of errors, clear
and close the location-list.

Using the error scratch window~

Pressing <Enter> or clicking on an error in the error scratch buffer will
jump to that error.

Using the Location-list~

The |location-list| is populated when running |:LanguageToolCheck|. So you can
use location-list Vim commands such as |:lopen| to open the location-list
window, |:lne| to jump to the next error, etc.

The error scratch window may seem redundant with the location-list, but the
scratch window is more flexible to present errors in a nice way. If you do
not wish to popup the error scratch window, but use the location-list only,
you can disable it by setting |g:languagetool_win_height| to a negative value.

============================================================================

7. Bugs *languagetool-bugs*

Column number reported by LanguageTool indicating the location of the error
is sometimes incorrect. There is already an opened ticket about this bug:

http://sourceforge.net/tracker/?func=detail&aid=3054895&group_id=110216&atid=655717

The script currently works around it by doing pattern matching with
information context but it's not a perfect workaround: it can cause
spurious highlighting of errors in rare cases.

Please report bugs or suggestions to <[email protected]>.
Alternatively, you can also discuss improvements to this plugin in Wiki
by clicking on the "Vim wiki" link at the top of the script page:

http://www.vim.org/scripts/script.php?script_id=3223

============================================================================

8. License *languagetool-license*

The VIM LICENSE applies to the LanguageTool.vim plugin (see |copyright|
except use "LanguageTool.vim" instead of "Vim").

LanguageTool is freely available under LGPL.

============================================================================
vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl:
15 changes: 15 additions & 0 deletions doc/tags
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:LanguageToolCheck LanguageTool.txt /*:LanguageToolCheck*
:LanguageToolClear LanguageTool.txt /*:LanguageToolClear*
LanguageTool LanguageTool.txt /*LanguageTool*
LanguageTool.txt LanguageTool.txt /*LanguageTool.txt*
g:languagetool_disable_rules LanguageTool.txt /*g:languagetool_disable_rules*
g:languagetool_jar LanguageTool.txt /*g:languagetool_jar*
g:languagetool_win_height LanguageTool.txt /*g:languagetool_win_height*
languagetool-bugs LanguageTool.txt /*languagetool-bugs*
languagetool-configuration LanguageTool.txt /*languagetool-configuration*
languagetool-download LanguageTool.txt /*languagetool-download*
languagetool-features LanguageTool.txt /*languagetool-features*
languagetool-installation LanguageTool.txt /*languagetool-installation*
languagetool-license LanguageTool.txt /*languagetool-license*
languagetool-overview LanguageTool.txt /*languagetool-overview*
languagetool-screenshots LanguageTool.txt /*languagetool-screenshots*
3 changes: 3 additions & 0 deletions ftdetect/mkd.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
" markdown filetype file
au BufRead,BufNewFile *.{md,mdown,mkd,mkdn,markdown,mdwn} set filetype=mkd

Loading

0 comments on commit 99cce0a

Please sign in to comment.