From 2cc00ba72929ea5f9456a26782db57fb4cc56a65 Mon Sep 17 00:00:00 2001 From: Joakker Date: Sun, 13 Dec 2020 23:07:57 -0300 Subject: [PATCH] Add walrus operator Closes #77 --- syntax/python.vim | 2 +- tests/test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/syntax/python.vim b/syntax/python.vim index 86b22c1..2524aba 100644 --- a/syntax/python.vim +++ b/syntax/python.vim @@ -114,7 +114,7 @@ endif " syn keyword pythonOperator and in is not or if s:Enabled('g:python_highlight_operators') - syn match pythonOperator '\V=\|-\|+\|*\|@\|/\|%\|&\||\|^\|~\|<\|>\|!=' + syn match pythonOperator '\V=\|-\|+\|*\|@\|/\|%\|&\||\|^\|~\|<\|>\|!=\|:=' endif syn match pythonError '[$?]\|\([-+@%&|^~]\)\1\{1,}\|\([=*/<>]\)\2\{2,}\|\([+@/%&|^~<>]\)\3\@![-+*@/%&|^~<>]\|\*\*[*@/%&|^<>]\|=[*@/%&|^<>]\|-[+*@/%&|^~<]\|[]\+=\{2,}\|!\{2,}=\+' display diff --git a/tests/test.py b/tests/test.py index 61b91a1..c0f81ac 100644 --- a/tests/test.py +++ b/tests/test.py @@ -182,7 +182,7 @@ and or in is not < <= == != >= > = =- =+ =~ --= += *= **= @= /= //= %= +-= += *= **= @= /= //= %= := &= |= ^= ~= <<= >>= ->