Add 'else' to auto deindent/align logic in context of 'case' statement
This commit is contained in:
parent
dbb548af2d
commit
e858df3ca2
|
@ -190,8 +190,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-a>i <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-a>i <a-semicolon> <a-?> ^\h*(?:case) <ret> <a-S> 1<a-&> }
|
||||
# align 'else/when' to 'case'
|
||||
try %{ execute-keys -draft <a-x> <a-k> ^\h*(?:else|when)$ <ret> <a-a>i <a-semicolon> <a-?> ^\h*(?:case) <ret> <a-S> 1<a-&> }
|
||||
# align 'rescue' to 'begin/def'
|
||||
try %{ execute-keys -draft <a-x> <a-k> ^\h*(?:rescue)$ <ret> <a-a>i <a-semicolon> <a-?> ^\h*(?:begin|def) <ret> <a-S> 1<a-&> }
|
||||
# align 'end' to opening structure
|
||||
|
|
Loading…
Reference in New Issue
Block a user