diff --git a/rc/filetype/sh.kak b/rc/filetype/sh.kak index 35076d9c..a3212760 100644 --- a/rc/filetype/sh.kak +++ b/rc/filetype/sh.kak @@ -182,6 +182,8 @@ define-command -hidden sh-indent-on-new-line %[ try %= execute-keys -draft k (\s|^)\{$ j = # deindent closing } try %= execute-keys -draft k ^\s*\}$ j K = + # deindent closing } when after cursor + try %= execute-keys -draft ^\h*\} gh / \} m 1 = ] ]