From e858df3ca288ce816068b2d163b7bbcbfdab90f8 Mon Sep 17 00:00:00 2001 From: John Isom Date: Sat, 1 Aug 2020 12:12:48 -0600 Subject: [PATCH] Add 'else' to auto deindent/align logic in context of 'case' statement --- rc/filetype/crystal.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/filetype/crystal.kak b/rc/filetype/crystal.kak index 1a55ffde..74c283d8 100644 --- a/rc/filetype/crystal.kak +++ b/rc/filetype/crystal.kak @@ -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 ^\h*(?:else|elsif)$ i ^\h*(?:if) 1 } - # align 'when' to 'case' - try %{ execute-keys -draft ^\h*(?:when)$ i ^\h*(?:case) 1 } + # align 'else/when' to 'case' + try %{ execute-keys -draft ^\h*(?:else|when)$ i ^\h*(?:case) 1 } # align 'rescue' to 'begin/def' try %{ execute-keys -draft ^\h*(?:rescue)$ i ^\h*(?:begin|def) 1 } # align 'end' to opening structure