diff --git a/rc/filetype/json.kak b/rc/filetype/json.kak index 58f1e328..994ffc5e 100644 --- a/rc/filetype/json.kak +++ b/rc/filetype/json.kak @@ -59,8 +59,8 @@ define-command -hidden json-indent-on-new-line %< try %{ execute-keys -draft K } # filter previous line try %{ execute-keys -draft k : json-trim-indent } - # indent after lines beginning with opener token - try %< execute-keys -draft k ^\h*[[{] j > + # indent after lines ending with opener token + try %< execute-keys -draft k [[{]\h*$ j > # deindent opener token(s) when after cursor try %< execute-keys -draft ^\h*[}\]]+\h*$ hm 1 > >