Ver código fonte

Make imports look like includes

Imports work like includes so they should use the relevant group-name.

I also renamed pythonPreCondit to pythonImport since it's specific to
that type of "preprocessor" statement.
pydave 11 anos atrás
pai
commit
9ccbd6196b
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3
    3
      syntax/python.vim

+ 3
- 3
syntax/python.vim Ver arquivo

@@ -149,7 +149,7 @@ syn keyword pythonStatement     with
149 149
 syn keyword pythonStatement     def class nextgroup=pythonFunction skipwhite
150 150
 syn keyword pythonRepeat        for while
151 151
 syn keyword pythonConditional   if elif else
152
-syn keyword pythonPreCondit     import from
152
+syn keyword pythonImport        import from
153 153
 syn keyword pythonException     try except finally
154 154
 syn keyword pythonOperator      and in is not or
155 155
 
@@ -157,7 +157,7 @@ if s:Python2Syntax()
157 157
   if !s:Enabled("g:python_print_as_function")
158 158
     syn keyword pythonStatement  print
159 159
   endif
160
-  syn keyword pythonPreCondit   as
160
+  syn keyword pythonImport      as
161 161
   syn match   pythonFunction    "[a-zA-Z_][a-zA-Z0-9_]*" display contained
162 162
 else
163 163
   syn keyword pythonStatement   as nonlocal None
@@ -469,7 +469,7 @@ if version >= 508 || !exists("did_python_syn_inits")
469 469
   endif
470 470
 
471 471
   HiLink pythonStatement        Statement
472
-  HiLink pythonPreCondit        Statement
472
+  HiLink pythonImport           Include
473 473
   HiLink pythonFunction         Function
474 474
   HiLink pythonConditional      Conditional
475 475
   HiLink pythonRepeat           Repeat