浏览代码

Python 3.5 new syntax sugar

https://www.python.org/dev/peps/pep-0492/
Ihor Gorobets 9 年前
父节点
当前提交
4d925a99dd
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5
    0
      syntax/python.vim

+ 5
- 0
syntax/python.vim 查看文件

@@ -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
 "