aboutsummaryrefslogtreecommitdiff
path: root/spellcheck.lua
diff options
context:
space:
mode:
Diffstat (limited to 'spellcheck.lua')
-rw-r--r--spellcheck.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/spellcheck.lua b/spellcheck.lua
index 3062d5c..3737a3e 100644
--- a/spellcheck.lua
+++ b/spellcheck.lua
@@ -470,4 +470,18 @@ vis:command_register('spelllang', function()
vis:info('The spellchecking language is ' .. spellcheck.get_lang())
end, 'Print the language used for spellchecking')
+vis:command_register('spell+', function()
+ enable_spellcheck()
+end, 'Enable spellchecking')
+
+vis:command_register('spell', function()
+ if not is_spellcheck_enabled() then
+ enable_spellcheck()
+ else
+ disable_spellcheck()
+ vis.win:draw()
+ end
+ return 0
+end, 'Toggle spellchecking in the current window')
+
return spellcheck