diff --git a/rc/filetype/ruby.kak b/rc/filetype/ruby.kak index 2be1291af..df3c496a9 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) s \A | \z ) } - try %{ execute-keys -draft ^ \h * (when) $ ^ \h * (case) s \A | \z ) } - try %{ execute-keys -draft ^ \h * (rescue) $ ^ \h * (begin) s \A | \z ) } - try %{ execute-keys -draft ^ \h * (end) $ ^ \h * (begin|case|class|def|for|if|module|unless|until|while) s \A | \z ) } + try %{ execute-keys -draft ^ \h * (else|elsif) $ ^ \h * (if) ) } + try %{ execute-keys -draft ^ \h * (when) $ ^ \h * (case) ) } + try %{ execute-keys -draft ^ \h * (rescue) $ ^ \h * (begin) ) } + try %{ execute-keys -draft ^ \h * (end) $ ^ \h * (begin|case|class|def|for|if|module|unless|until|while) ) } } }