From 0959f6d130c5f558b11652b3719196c5507a0c6a Mon Sep 17 00:00:00 2001 From: nfnty Date: Mon, 27 Feb 2017 00:07:03 +0100 Subject: [PATCH] Do not error highlight PEP 3017 operator Fixes #11 --- syntax/python.vim | 2 +- tests/test.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/syntax/python.vim b/syntax/python.vim index d9a2946..c7d72a0 100644 --- a/syntax/python.vim +++ b/syntax/python.vim @@ -102,7 +102,7 @@ syn keyword pythonOperator and in is not or if s:Enabled('g:python_highlight_operators') syn match pythonOperator '\V=\|-\|+\|*\|@\|/\|%\|&\||\|^\|~\|<\|>\|!=' endif -syn match pythonError '[$?]\|\([-+@%&|^~]\)\1\{1,}\|\([=*/<>]\)\2\{2,}\|\([-=+*@/%&|^~<>]\)\3\@![-+*@/%&|^~<>]\|[]\+=\{2,}\|!\{2,}=\+' display +syn match pythonError '[$?]\|\([-+@%&|^~]\)\1\{1,}\|\([=*/<>]\)\2\{2,}\|\([+=*@/%&|^~<>]\)\3\@![-+*@/%&|^~<>]\|-[+*@/%&|^~<]\|[]\+=\{2,}\|!\{2,}=\+' display " " Decorators (new in Python 2.4) diff --git a/tests/test.py b/tests/test.py index 4547ab5..26f4771 100644 --- a/tests/test.py +++ b/tests/test.py @@ -117,6 +117,8 @@ and or in is not -= += *= **= @= /= //= %= &= |= ^= ~= <<= >>= +-> + # Erroneous operators $ ?