diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2020-09-02 06:33:32 +0200 |
|---|---|---|
| committer | Johannes Altmanninger <aclopte@gmail.com> | 2020-09-02 06:44:36 +0200 |
| commit | e1de4aa1180d82100b0b3fda8fbec02605551daa (patch) | |
| tree | e5c68afb3476b31ca0805854d785a3e126d59489 /rc/filetype/python.kak | |
| parent | e0d2602e6a924c9a4067fa9ff23f034b906dd56d (diff) | |
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:
Diffstat (limited to 'rc/filetype/python.kak')
| -rw-r--r-- | rc/filetype/python.kak | 2 |
1 files changed, 1 insertions, 1 deletions
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 <a-x> s \h+$ <ret> d } # 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) try %< execute-keys -draft <a-x> <a-k> ^\h*[}\]] <ret> gh / [}\]] <ret> m <a-S> 1<a-&> > > |
