AutoYADM commit: 2025-05-26 20:34:39

This commit is contained in:
Daniel Fichtinger 2025-05-26 20:34:39 -04:00
parent 4769181f99
commit 405e779c5e
3 changed files with 25 additions and 16 deletions

View file

@ -6,9 +6,6 @@ hook global WinSetOption filetype=mail %~
hook -group mail-spell window ModeChange (push|pop):.*insert %{
try %{ spell-clear }
}
# hook -group mail-spell window ModeChange (push|pop):insert:.* %{
# try %{ spell }
# }
hook -group mail-spell window NormalIdle .* %{ try spell }
hook -group mail-auto-format window BufWritePre .* format
hook -once -always window WinSetOption filetype=.* %{

View file

@ -0,0 +1,24 @@
# 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>'
~