summaryrefslogtreecommitdiff
path: root/rc/core/python.kak
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2016-10-01 13:43:21 +0100
committerMaxime Coste <frrrwww@gmail.com>2016-10-01 13:43:21 +0100
commite65aa4a6dedd2022c80eb92311d66cd2f56d933d (patch)
tree01961b42d80ab2ff17561382d6202360a0f0d284 /rc/core/python.kak
parentdc735450a841142a940cfcdce6cbec0485052e61 (diff)
parenta68f5f20a1385e46ec0a1f370fabaa3108f01f5c (diff)
Merge remote-tracking branch 'greduan/highlighter-group'
Diffstat (limited to 'rc/core/python.kak')
-rw-r--r--rc/core/python.kak6
1 files changed, 4 insertions, 2 deletions
diff --git a/rc/core/python.kak b/rc/core/python.kak
index 37d72e6e..51e447ae 100644
--- a/rc/core/python.kak
+++ b/rc/core/python.kak
@@ -69,8 +69,9 @@ def -hidden _python_indent_on_new_line %{
# Initialization
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
+hook -group python-highlight global WinSetOption filetype=python %{ addhl ref python }
+
hook global WinSetOption filetype=python %{
- addhl ref python
hook window InsertChar \n -group python-indent _python_indent_on_new_line
# cleanup trailing whitespaces on current line insert end
hook window InsertEnd .* -group python-indent %{ try %{ exec -draft \; <a-x> s ^\h+$ <ret> d } }
@@ -78,7 +79,8 @@ hook global WinSetOption filetype=python %{
set window formatcmd "autopep8 -"
}
+hool -group python-highlight global WinSetOption filetype=(?!python).* %{ rmhl python }
+
hook global WinSetOption filetype=(?!python).* %{
- rmhl python
rmhooks window python-indent
}