mirror of
https://github.com/vim-python/python-syntax.git
synced 2026-01-26 21:09:13 +08:00
@@ -19,7 +19,7 @@ Features
|
|||||||
* New exceptions and builtins
|
* New exceptions and builtins
|
||||||
* Doctests
|
* Doctests
|
||||||
* `@decorator` syntax
|
* `@decorator` syntax
|
||||||
* Class variables such as `self` and `cls`
|
* Class variables such as `self`, `cls`, and `mcs`
|
||||||
* Operators
|
* Operators
|
||||||
* Highlighting of the following errors:
|
* Highlighting of the following errors:
|
||||||
* Invalid symbols in source file
|
* Invalid symbols in source file
|
||||||
@@ -72,7 +72,7 @@ let g:python_highlight_all = 1
|
|||||||
| `g:python_highlight_space_errors` | Highlight trailing spaces | `0` |
|
| `g:python_highlight_space_errors` | Highlight trailing spaces | `0` |
|
||||||
| `g:python_highlight_doctests` | Highlight doc-tests | `0` |
|
| `g:python_highlight_doctests` | Highlight doc-tests | `0` |
|
||||||
| `g:python_highlight_func_calls` | Highlight functions calls | `0` |
|
| `g:python_highlight_func_calls` | Highlight functions calls | `0` |
|
||||||
| `g:python_highlight_class_vars` | Highlight class variables `self` and `cls` | `0` |
|
| `g:python_highlight_class_vars` | Highlight class variables `self`, `cls`, and `mcs` | `0` |
|
||||||
| `g:python_highlight_operators` | Highlight all operators | `0` |
|
| `g:python_highlight_operators` | Highlight all operators | `0` |
|
||||||
| `g:python_highlight_all` | Enable all highlight options above, except for previously set. | `0` |
|
| `g:python_highlight_all` | Enable all highlight options above, except for previously set. | `0` |
|
||||||
| `g:python_highlight_file_headers_as_comments` | Highlight shebang and coding headers as comments | `0` |
|
| `g:python_highlight_file_headers_as_comments` | Highlight shebang and coding headers as comments | `0` |
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Features
|
|||||||
* New exceptions and builtins
|
* New exceptions and builtins
|
||||||
* Doctests
|
* Doctests
|
||||||
* `@decorator` syntax
|
* `@decorator` syntax
|
||||||
* Class variables such as `self` and `cls`
|
* Class variables such as `self`, `cls`, and `mcs`
|
||||||
* Operators
|
* Operators
|
||||||
* Highlighting of the following errors:
|
* Highlighting of the following errors:
|
||||||
* Invalid symbols in source file
|
* Invalid symbols in source file
|
||||||
@@ -96,7 +96,7 @@ following command to your `~/.config/nvim/init.vim` or `~/.vimrc`: >
|
|||||||
Highlight functions calls
|
Highlight functions calls
|
||||||
|
|
||||||
`g:python_highlight_class_vars` (default `0`)
|
`g:python_highlight_class_vars` (default `0`)
|
||||||
Highlight class variables `self` and `cls`
|
Highlight class variables `self`, `cls`, and `mcs`
|
||||||
|
|
||||||
`g:python_highlight_operators` (default `0`)
|
`g:python_highlight_operators` (default `0`)
|
||||||
Highlight all operators
|
Highlight all operators
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ syn keyword pythonStatement break continue del return pass yield global asse
|
|||||||
syn keyword pythonStatement raise nextgroup=pythonExClass skipwhite
|
syn keyword pythonStatement raise nextgroup=pythonExClass skipwhite
|
||||||
syn keyword pythonStatement def class nextgroup=pythonFunction skipwhite
|
syn keyword pythonStatement def class nextgroup=pythonFunction skipwhite
|
||||||
if s:Enabled('g:python_highlight_class_vars')
|
if s:Enabled('g:python_highlight_class_vars')
|
||||||
syn keyword pythonClassVar self cls
|
syn keyword pythonClassVar self cls mcs
|
||||||
endif
|
endif
|
||||||
syn keyword pythonRepeat for while
|
syn keyword pythonRepeat for while
|
||||||
syn keyword pythonConditional if elif else
|
syn keyword pythonConditional if elif else
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
with break continue del return pass raise global assert lambda yield
|
with break continue del return pass raise global assert lambda yield
|
||||||
for while if elif else import as try except finally
|
for while if elif else import as try except finally
|
||||||
|
|
||||||
|
self cls mcs
|
||||||
|
|
||||||
from test import var as name
|
from test import var as name
|
||||||
|
|
||||||
raise Exception from ex
|
raise Exception from ex
|
||||||
|
|||||||
Reference in New Issue
Block a user