diff --git a/rc/filetype/python.kak b/rc/filetype/python.kak index bac31e3f..08b079c9 100644 --- a/rc/filetype/python.kak +++ b/rc/filetype/python.kak @@ -157,6 +157,8 @@ define-command -hidden python-indent-on-new-line %{ try %{ execute-keys -draft k s \h+$ d } # indent after line ending with : try %{ execute-keys -draft k :$ j } + # deindent closing brace/bracket when after cursor (for arrays and dictionaries) + try %[ execute-keys -draft ^\h*[}\]] gh / [}\]] m 1 ] } }