diff options
| author | Olivier Perret <Olivier.Perret@mailbox.org> | 2018-12-11 00:11:35 +0100 |
|---|---|---|
| committer | Olivier Perret <Olivier.Perret@mailbox.org> | 2018-12-11 00:35:57 +0100 |
| commit | 27f951638c6086b6dbb6f467d607d628a188a67d (patch) | |
| tree | 7f2613977f9556a569501cafe4daaab084126557 /rc/core/python.kak | |
| parent | 93c308ca53c257e087129ec6dd8611812a7fc82e (diff) | |
Execute cleanup hooks on any filetype change
Diffstat (limited to 'rc/core/python.kak')
| -rw-r--r-- | rc/core/python.kak | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rc/core/python.kak b/rc/core/python.kak index 8563423d..fac94ae1 100644 --- a/rc/core/python.kak +++ b/rc/core/python.kak @@ -137,12 +137,12 @@ define-command -hidden python-indent-on-new-line %{ hook -group python-highlight global WinSetOption filetype=python %{ add-highlighter window/python ref python - hook -once -always window WinSetOption filetype=(?!python).* %{ remove-highlighter window/python } + hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/python } } hook global WinSetOption filetype=python %{ hook window InsertChar \n -group python-indent python-indent-on-new-line # cleanup trailing whitespaces on current line insert end hook window ModeChange insert:.* -group python-indent %{ try %{ execute-keys -draft \; <a-x> s ^\h+$ <ret> d } } - hook -once -always window WinSetOption filetype=(?!python).* %{ remove-hooks window python-.+ } + hook -once -always window WinSetOption filetype=.* %{ remove-hooks window python-.+ } } |
