AutoYADM commit: 2025-05-26 21:05:41

This commit is contained in:
Daniel Fichtinger 2025-05-26 21:05:41 -04:00
parent e9b8ab9717
commit 2adef12e49
2 changed files with 4 additions and 3 deletions

View file

@ -1,4 +1,3 @@
# spellcheck using aspell for now (maybe better options?)
provide-module spell %~ provide-module spell %~
define-command -override -hidden true nop define-command -override -hidden true nop
@ -8,6 +7,7 @@ provide-module spell %~
define-command -docstring %{ define-command -docstring %{
Enable autospell. Autospell refreshes spellchecks and hides spelling in insert mode. Enable autospell. Autospell refreshes spellchecks and hides spelling in insert mode.
} autospell-enable %{ } autospell-enable %{
set-option window autospell_enabled true
try %{ try %{
spell spell
hook -group auto-spell window ModeChange (push|pop):.*insert %{ hook -group auto-spell window ModeChange (push|pop):.*insert %{
@ -22,6 +22,7 @@ provide-module spell %~
define-command -docstring %{ define-command -docstring %{
Disable autospell. Autospell refreshes spellchecks and hides spelling in insert mode. Disable autospell. Autospell refreshes spellchecks and hides spelling in insert mode.
} autospell-disable %{ } autospell-disable %{
set-option window autospell_enabled false
try spell-clear try spell-clear
remove-hooks window auto-spell remove-hooks window auto-spell
} }
@ -39,10 +40,9 @@ provide-module spell %~
declare-user-mode spell declare-user-mode spell
map -docstring 'autospell toggle' global spell t ': autospell-toggle<ret>'
map -docstring 'show spell' global spell s ': spell<ret>' 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 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 prev' global spell m ': spell-prev<ret>'
map -docstring 'spell clear' global spell c ': spell-clear<ret>' map -docstring 'spell clear' global spell c ': spell-clear<ret>'
map -docstring 'spell add' global spell a ': spell-add<ret>' map -docstring 'spell add' global spell a ': spell-add<ret>'

View file

@ -67,4 +67,5 @@ define-command autowrap-toggle -docstring "toggle autowrap" %{
} }
map -docstring 'toggle autowrap' global ui a ": autowrap-toggle<ret>" map -docstring 'toggle autowrap' global ui a ": autowrap-toggle<ret>"
map -docstring 'toggle autospell' global ui s ": autospell-toggle<ret>"
~ ~