Skip to content

Commit 2ccfb14

Browse files
fishsouprecipenfnty
fishsouprecipe
authored andcommitted
Add mcs to class variables
Closes #74
1 parent c661c01 commit 2ccfb14

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Features
1919
* New exceptions and builtins
2020
* Doctests
2121
* `@decorator` syntax
22-
* Class variables such as `self` and `cls`
22+
* Class variables such as `self`, `cls`, and `mcs`
2323
* Operators
2424
* Highlighting of the following errors:
2525
* Invalid symbols in source file
@@ -72,7 +72,7 @@ let g:python_highlight_all = 1
7272
| `g:python_highlight_space_errors` | Highlight trailing spaces | `0` |
7373
| `g:python_highlight_doctests` | Highlight doc-tests | `0` |
7474
| `g:python_highlight_func_calls` | Highlight functions calls | `0` |
75-
| `g:python_highlight_class_vars` | Highlight class variables `self` and `cls` | `0` |
75+
| `g:python_highlight_class_vars` | Highlight class variables `self`, `cls`, and `mcs` | `0` |
7676
| `g:python_highlight_operators` | Highlight all operators | `0` |
7777
| `g:python_highlight_all` | Enable all highlight options above, except for previously set. | `0` |
7878
| `g:python_highlight_file_headers_as_comments` | Highlight shebang and coding headers as comments | `0` |

doc/python-syntax.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Features
2121
* New exceptions and builtins
2222
* Doctests
2323
* `@decorator` syntax
24-
* Class variables such as `self` and `cls`
24+
* Class variables such as `self`, `cls`, and `mcs`
2525
* Operators
2626
* Highlighting of the following errors:
2727
* Invalid symbols in source file
@@ -96,7 +96,7 @@ following command to your `~/.config/nvim/init.vim` or `~/.vimrc`: >
9696
Highlight functions calls
9797

9898
`g:python_highlight_class_vars` (default `0`)
99-
Highlight class variables `self` and `cls`
99+
Highlight class variables `self`, `cls`, and `mcs`
100100

101101
`g:python_highlight_operators` (default `0`)
102102
Highlight all operators

syntax/python.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ syn keyword pythonStatement break continue del return pass yield global asse
7676
syn keyword pythonStatement raise nextgroup=pythonExClass skipwhite
7777
syn keyword pythonStatement def class nextgroup=pythonFunction skipwhite
7878
if s:Enabled('g:python_highlight_class_vars')
79-
syn keyword pythonClassVar self cls
79+
syn keyword pythonClassVar self cls mcs
8080
endif
8181
syn keyword pythonRepeat for while
8282
syn keyword pythonConditional if elif else

tests/test.py

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
with break continue del return pass raise global assert lambda yield
1212
for while if elif else import as try except finally
1313

14+
self cls mcs
15+
1416
from test import var as name
1517

1618
raise Exception from ex

0 commit comments

Comments
 (0)