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:
parent
e0d2602e6a
commit
e1de4aa118
|
@ -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-&> >
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user