diff --git a/rc/filetype/javascript.kak b/rc/filetype/javascript.kak index 191ae95d..aae3b89f 100644 --- a/rc/filetype/javascript.kak +++ b/rc/filetype/javascript.kak @@ -62,6 +62,8 @@ define-command -hidden javascript-indent-on-new-line %< try %{ execute-keys -draft k : javascript-trim-indent } # indent after lines beginning / ending with opener token try %_ execute-keys -draft k ^\h*[[{]|[[{]$ j _ + # deindent closing token(s) when after cursor + try %_ execute-keys -draft ^\h*[}\]]+\h*$ hm 1 _ > >