Browse Source

Python 3.5 new syntax sugar

https://www.python.org/dev/peps/pep-0492/
Ihor Gorobets 4 years ago
parent
commit
4d925a99dd
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      syntax/python.vim

+ 5
- 0
syntax/python.vim View File

@@ -174,6 +174,11 @@ else
174 174
   syn match   pythonStatement   "\<yield\s\+from\>" display
175 175
   syn keyword pythonBoolean     True False
176 176
   syn match   pythonFunction    "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
177
+  syn keyword pythonStatement   await
178
+  syn match   pythonStatement   "\<async\s\+def\>" display
179
+  syn match   pythonStatement   "\<async\s\+with\>" display
180
+  syn match   pythonStatement   "\<async\s\+for\>" display
181
+  syn match   pythonStatement   "\<async\s\+with\>" display
177 182
 endif
178 183
 
179 184
 "