24 lines
983 B
Text
24 lines
983 B
Text
# spellcheck using aspell for now (maybe better options?)
|
|
provide-module spell %~
|
|
define-command -hidden register-autospell %{
|
|
hook -group auto-spell window ModeChange (push|pop):.*insert %{
|
|
try %{ spell-clear }
|
|
}
|
|
hook -group auto-spell window NormalIdle .* %{ try spell }
|
|
}
|
|
|
|
# keybindings
|
|
|
|
declare-user-mode spell
|
|
|
|
map -docstring 'show spell' global spell s ': spell<ret>'
|
|
map -docstring 'spell next' global spell n ': spell-next<ret>'
|
|
map -docstring 'spell next' global spell i ': spell-next<ret>'
|
|
map -docstring 'spell prev' global spell e ': spell-prev<ret>'
|
|
map -docstring 'spell prev' global spell m ': spell-prev<ret>'
|
|
map -docstring 'spell clear' global spell c ': spell-clear<ret>'
|
|
map -docstring 'spell add' global spell a ': spell-add<ret>'
|
|
map -docstring 'spell replace' global spell r ': spell-replace<ret>'
|
|
|
|
map -docstring 'spelling' global user s ': enter-user-mode spell<ret>'
|
|
~
|