From ddaa31a300e0cba6989c23def176fefdf1ab1b95 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Thu, 30 Jul 2015 17:59:22 +0300 Subject: [PATCH 1/2] Highlight python types, when they are not used as constructors --- rc/python.kak | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rc/python.kak b/rc/python.kak index 393c3f926..94d159ab3 100644 --- a/rc/python.kak +++ b/rc/python.kak @@ -31,6 +31,8 @@ addhl -group /python/code regex \<(import|from)\> 0:meta # Keyword list is collected using `keyword.kwlist` from `keyword` addhl -group /python/code regex \<(and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|global|if|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\> 0:keyword +# Highlight types, when they are not used as constructors +addhl -group /python/code regex \<(buffer|bytearray|complex|dict|file|float|frozenset|int|list|long|memoryview|set|str|tuple|unicode|xrange)\>[^(] 0:type # Commands # ‾‾‾‾‾‾‾‾ From 560a02e386e1a006a05018976419f10768c46df5 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Thu, 30 Jul 2015 18:10:29 +0300 Subject: [PATCH 2/2] Add the object type to the list of python highlighted types --- rc/python.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/python.kak b/rc/python.kak index 94d159ab3..0d5cf3054 100644 --- a/rc/python.kak +++ b/rc/python.kak @@ -32,7 +32,7 @@ addhl -group /python/code regex \<(import|from)\> 0:meta # Keyword list is collected using `keyword.kwlist` from `keyword` addhl -group /python/code regex \<(and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|global|if|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\> 0:keyword # Highlight types, when they are not used as constructors -addhl -group /python/code regex \<(buffer|bytearray|complex|dict|file|float|frozenset|int|list|long|memoryview|set|str|tuple|unicode|xrange)\>[^(] 0:type +addhl -group /python/code regex \<(buffer|bytearray|complex|dict|file|float|frozenset|int|list|long|memoryview|object|set|str|tuple|unicode|xrange)\>[^(] 0:type # Commands # ‾‾‾‾‾‾‾‾