Add rule to align else/elsif to opening if

This commit is contained in:
John Isom 2020-08-01 10:27:51 -06:00
parent 2c382de1e8
commit 76eadef00b

View File

@ -201,6 +201,10 @@ define-command -hidden crystal-insert-on-new-line %{
}
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-&> }
}
}
define-command -hidden crystal-fetch-keywords %{