diff --git a/rc/filetype/python.kak b/rc/filetype/python.kak index 76cf496a..2259cbf5 100644 --- a/rc/filetype/python.kak +++ b/rc/filetype/python.kak @@ -156,7 +156,7 @@ define-command -hidden python-indent-on-new-line %< # cleanup trailing whitespaces from previous line try %{ execute-keys -draft k s \h+$ d } # indent after line ending with : - try %{ execute-keys -draft k :$ j } + try %{ execute-keys -draft k :$ ^\h*# j } # deindent closing brace/bracket when after cursor (for arrays and dictionaries) try %< execute-keys -draft ^\h*[}\]] gh / [}\]] m 1 > >