Add rule to align 'when' to 'case'

This commit is contained in:
John Isom 2020-08-01 10:31:38 -06:00
parent 76eadef00b
commit 21c083f47c

View File

@ -204,6 +204,8 @@ define-command -hidden crystal-indent-on-char %{
evaluate-commands -no-hooks -draft -itersel %{
# align 'else/elsif' to 'if'
try %{ execute-keys -draft <a-x> <a-k> ^\h*(?:else|elsif)$ <ret> <a-semicolon> <a-?> ^\h*(?:if) <ret> <a-S> 1<a-&> }
# align 'when' to 'case'
try %{ execute-keys -draft <a-x> <a-k> ^\h*(?:when)$ <ret> <a-semicolon> <a-?> ^\h*(?:case) <ret> <a-S> 1<a-&> }
}
}