From d6e3c1ff19a614502c4f56bce0ce895c01b9f201 Mon Sep 17 00:00:00 2001 From: John Isom Date: Sat, 1 Aug 2020 10:52:26 -0600 Subject: [PATCH] Fix deindenting nested blocks/statements --- rc/filetype/ruby.kak | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rc/filetype/ruby.kak b/rc/filetype/ruby.kak index 25981378..e5a2f711 100644 --- a/rc/filetype/ruby.kak +++ b/rc/filetype/ruby.kak @@ -139,10 +139,10 @@ 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) $ ^ \h * (if) 1 } - try %{ execute-keys -draft ^ \h * (when) $ ^ \h * (case) 1 } - try %{ execute-keys -draft ^ \h * (rescue) $ ^ \h * (begin|def) 1 } - try %{ execute-keys -draft ^ \h * (end) $ ^ \h * (begin|case|class|def|for|if|module|unless|until|while) 1 } + try %{ execute-keys -draft ^ \h * (else|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 } } }