diff --git a/rc/base/fish.kak b/rc/base/fish.kak index 4eb82b79..d8987188 100644 --- a/rc/base/fish.kak +++ b/rc/base/fish.kak @@ -39,9 +39,9 @@ define-command -hidden fish-filter-around-selections %{ define-command -hidden fish-indent-on-char %{ evaluate-commands -no-hooks -draft -itersel %{ # align middle and end structures to start and indent when necessary - try %{ execute-keys -draft ^\h*(else)$^\h*(if)s\A|\z' } - try %{ execute-keys -draft ^\h*(end)$^\h*(begin|for|function|if|switch|while)s\A|\z' } - try %{ execute-keys -draft ^\h*(case)$^\h*(switch)s\A|\z'' } + try %{ execute-keys -draft ^\h*(else)$^\h*(if)s\A|\z) } + try %{ execute-keys -draft ^\h*(end)$^\h*(begin|for|function|if|switch|while)s\A|\z) } + try %{ execute-keys -draft ^\h*(case)$^\h*(switch)s\A|\z)) } } } diff --git a/rc/base/lua.kak b/rc/base/lua.kak index 53c84de4..4fc145d7 100644 --- a/rc/base/lua.kak +++ b/rc/base/lua.kak @@ -55,8 +55,8 @@ define-command lua-alternative-file -docstring 'Jump to the alternate file (impl define-command -hidden lua-indent-on-char %{ evaluate-commands -no-hooks -draft -itersel %{ # align middle and end structures to start and indent when necessary, elseif is already covered by else - try %{ execute-keys -draft ^\h*(else)$^\h*(if)s\A|\z' } - try %{ execute-keys -draft ^\h*(end)$^\h*(for|function|if|while)s\A|\z' } + try %{ execute-keys -draft ^\h*(else)$^\h*(if)s\A|\z) } + try %{ execute-keys -draft ^\h*(end)$^\h*(for|function|if|while)s\A|\z) } } } diff --git a/rc/base/perl.kak b/rc/base/perl.kak index 7a9d6c59..de261e48 100644 --- a/rc/base/perl.kak +++ b/rc/base/perl.kak @@ -91,7 +91,7 @@ define-command -hidden perl-indent-on-new-line %~ define-command -hidden perl-indent-on-opening-curly-brace %[ # align indent with opening paren when { is entered on a new line after the closing paren - try %[ execute-keys -draft -itersel h)M \A\(.*\)\h*\n\h*\{\' s \A|.\z 1 ] + try %[ execute-keys -draft -itersel h)M \A\(.*\)\h*\n\h*\{) s \A|.\z 1 ] ] define-command -hidden perl-indent-on-closing-curly-brace %[ diff --git a/rc/base/ruby.kak b/rc/base/ruby.kak index e6035043..f93ba04b 100644 --- a/rc/base/ruby.kak +++ b/rc/base/ruby.kak @@ -113,10 +113,10 @@ define-command -hidden ruby-filter-around-selections %{ 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|do|for|if|module|unless|until|while) s \A | \z \' } + 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|do|for|if|module|unless|until|while) s \A | \z ) } } } diff --git a/rc/extra/moon.kak b/rc/extra/moon.kak index f027c41e..bee113ec 100644 --- a/rc/extra/moon.kak +++ b/rc/extra/moon.kak @@ -66,11 +66,11 @@ define-command -hidden moon-filter-around-selections %{ define-command -hidden moon-indent-on-char %{ evaluate-commands -draft -itersel %{ # align _else_ statements to start - try %{ execute-keys -draft ^ \h * (else(if)?) $ ^ \h * (if|unless|when) s \A | \z \' } + try %{ execute-keys -draft ^ \h * (else(if)?) $ ^ \h * (if|unless|when) s \A | \z ) } # align _when_ to _switch_ then indent - try %{ execute-keys -draft ^ \h * (when) $ ^ \h * (switch) s \A | \z \' \' } + try %{ execute-keys -draft ^ \h * (when) $ ^ \h * (switch) s \A | \z ) ) } # align _catch_ and _finally_ to _try_ - try %{ execute-keys -draft ^ \h * (catch|finally) $ ^ \h * (try) s \A | \z \' } + try %{ execute-keys -draft ^ \h * (catch|finally) $ ^ \h * (try) s \A | \z ) } } }