From fdf38ecc5ee93063ab1fb2261d9dc83393770a7e Mon Sep 17 00:00:00 2001 From: John Isom Date: Sun, 2 Aug 2020 11:28:27 -0600 Subject: [PATCH] Fix auto indentation for if/case and else --- rc/filetype/ruby.kak | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rc/filetype/ruby.kak b/rc/filetype/ruby.kak index 6fbe951a..ea4b2279 100644 --- a/rc/filetype/ruby.kak +++ b/rc/filetype/ruby.kak @@ -150,10 +150,11 @@ define-command -hidden ruby-trim-indent %{ define-command -hidden ruby-indent-on-char %{ evaluate-commands -no-hooks -draft -itersel %{ # align middle and end structures to start - try %{ execute-keys -draft ^ \h * (else|elsif) $ i ^ \h * (if) 1 } - try %{ execute-keys -draft ^ \h * (else|when) $ i ^ \h * (case) 1 } - try %{ execute-keys -draft ^ \h * (rescue) $ i ^ \h * (begin|def) 1 } - try %{ execute-keys -draft ^ \h * (end) $ i ^ \h * (begin|case|class|def|for|if|module|unless|until|while) 1 } + try %{ execute-keys -draft ^ \h * (else) $ i ^ \h * (if|case) 1 } + try %{ execute-keys -draft ^ \h * (elsif) $ i ^ \h * (if) 1 } + try %{ execute-keys -draft ^ \h * (when) $ i ^ \h * (case) 1 } + try %{ execute-keys -draft ^ \h * (rescue) $ i ^ \h * (begin|def) 1 } + try %{ execute-keys -draft ^ \h * (end) $ i ^ \h * (begin|case|class|def|for|if|module|unless|until|while) 1 } } }