aboutsummaryrefslogtreecommitdiffstats
path: root/Readme.md
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-01-28 05:06:05 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-01-28 05:07:00 +0100
commit44a9d7b04f9fb752c67a084ebdfa8c97b65a9894 (patch)
treee56360e55c9defb4fdf9b71abc09e4a4a3a15283 /Readme.md
parent9152bd54c6bcaa4afe4f29054c6ec13d7d9c6e82 (diff)
downloadvis-spellcheck-44a9d7b04f9fb752c67a084ebdfa8c97b65a9894.tar.gz
Update Readme
Diffstat (limited to 'Readme.md')
-rw-r--r--Readme.md28
1 files changed, 19 insertions, 9 deletions
diff --git a/Readme.md b/Readme.md
index fc02303..d0d1029 100644
--- a/Readme.md
+++ b/Readme.md
@@ -9,20 +9,30 @@ A spellchecking lua plugin for the [vis editor](https://github.com/martanne/vis)
## usage
-+ To correct the whole file press `<Ctrl+w><a>` in normal mode.
-+ To correct the word under the curser press `<Ctrl+w><w>` in normal mode.
++ To enable highlighting of misspelled words press `<Ctrl-w>e` in normal mode.
++ To disable highlighting press `<Ctrl-w>d` in normal mode.
++ To correct the word under the cursor press `<Ctrl+w>w` in normal mode.
++ To ignore the word under the cursor press `<Ctrl+w>i` in normal mode.
## configuration
-The module table returned from `require(...)` has two configuration fields
-`lang` and `cmd`. `lang` is inserted in the `cmd` string at `%s`.
-The defaults are `enchant -d %s` and `$LANG` or `en_US`.
+The module table returned from `require(...)` has three configuration options:
- spell = require(...)
- spell.cmd = "aspell -l %s -a"
- spell.lang = "en_US"
+* `cmd`: cmd that is passed to popen() and must return word corrections in Ispell format.
+ * default: `enchant -d %s`
+* `list_cmd`: cmd that is passed to popen() and must output a list of misspelled words.
+ * default: `enchant -l -d %s`
+* `lang`: The name of the used dictionary. `lang` is inserted in the cmd-strings at `%s`.
+ * default: `$LANG` or `en_US`
-During runtime:
+A possible configuration could look like this:
+
+ spellcheck = require(...)
+ spellcheck.cmd = "aspell -l %s -a"
+ spellcheck.list_cmd = "aspell list -l %s -a"
+ spellcheck.lang = "de_DE"
+
+Changing language during runtime:
:set spelllang en_US