declare-option -docstring 'mail formatter' str mail_fmt '/home/fic/dev/utils/mail-utils/format.py' hook global WinSetOption filetype=mail %~ set-option window formatcmd %opt{mail_fmt} set-option window comment_line '>' hook -group mail-spell window ModeChange (push|pop):.*insert %{ try %{ spell-clear } } hook -group mail-spell window NormalIdle .* %{ try spell } hook -group mail-auto-format window BufWritePre .* format hook -once -always window WinSetOption filetype=.* %{ unset-option window formatcmd remove-hooks window mail-auto-format } ~