python.kak: Do not indent after comments ending in :

Fixes #3693

This will not work for lines like the one below but I think that's okay
because it does work for most comments.

	foo() # foo:
This commit is contained in:
Johannes Altmanninger 2020-09-02 06:33:32 +02:00
parent e0d2602e6a
commit e1de4aa118

View File

@ -156,7 +156,7 @@ define-command -hidden python-indent-on-new-line %<
# cleanup trailing whitespaces from previous line # cleanup trailing whitespaces from previous line
try %{ execute-keys -draft k <a-x> s \h+$ <ret> d } try %{ execute-keys -draft k <a-x> s \h+$ <ret> d }
# indent after line ending with : # indent after line ending with :
try %{ execute-keys -draft <space> k <a-x> <a-k> :$ <ret> j <a-gt> } try %{ execute-keys -draft <space> k <a-x> <a-k> :$ <ret> <a-K> ^\h*# <ret> j <a-gt> }
# deindent closing brace/bracket when after cursor (for arrays and dictionaries) # deindent closing brace/bracket when after cursor (for arrays and dictionaries)
try %< execute-keys -draft <a-x> <a-k> ^\h*[}\]] <ret> gh / [}\]] <ret> m <a-S> 1<a-&> > try %< execute-keys -draft <a-x> <a-k> ^\h*[}\]] <ret> gh / [}\]] <ret> m <a-S> 1<a-&> >
> >