From 40aaf63338021fee8377c74f2581a1c728be3fdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Ros=C3=A9n?= Date: Sun, 7 Jan 2018 23:30:35 +0100 Subject: [PATCH] Highlight python doctests in docstrings --- rc/core/python.kak | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/rc/core/python.kak b/rc/core/python.kak index 971fbce3..1083c8d7 100644 --- a/rc/core/python.kak +++ b/rc/core/python.kak @@ -12,8 +12,8 @@ hook global BufCreate .*[.](py) %{ # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ add-highlighter shared/ regions -default code python \ - double_string '"""' '"""' '' \ - single_string "'''" "'''" '' \ + docstring '"""' '"""' '' \ + docstring "'''" "'''" '' \ double_string '"' (?>> \K' '\z' '' \ + python '\.\.\. \K' '\z' '' +add-highlighter shared/python/docstring/py-docstring/python ref python +add-highlighter shared/python/docstring/py-docstring/docstring fill string + add-highlighter shared/python/comment fill comment %sh{