Fix indentation rule for json.kak

This commit is contained in:
John Isom 2020-07-27 20:52:35 -06:00
parent 8c9afa8a91
commit 9dd292d100

View File

@ -61,6 +61,8 @@ define-command -hidden json-indent-on-new-line %<
try %{ execute-keys -draft k : json-trim-indent <ret> }
# indent after lines beginning with opener token
try %< execute-keys -draft k <a-x> <a-k> ^\h*[[{] <ret> j <a-gt> >
# deindent opener token(s) when after cursor
try %< execute-keys -draft <a-x> <a-k>^\h*[}\]]+\h*$<ret> hm <a-S> 1<a-&> >
>
>