Closed monkoose closed 7 years ago
PRs are welcome.
Ok, will add it tomorrow.
I made PR for self_cls proposal.
But the second one is more complecated and needs some discussion.
Should we add just one variable for all this signs? Or should we break them into few variables for more control?
Something like g:python_highlight_equal_operator
g:python_highlight_bitwise_operators
g:python_highlight_comparison_operators
etc?
And btw, I had this in my syntax for a long time and never had any issue
syn match pythonExtraOperator "\%([~!^&|/%+-]\|\%(class\s*\)\@<!<<\|<=>\|<=\|\%(<\|\<class\s\+\u\w*\s*\)\@<!<[^<]\@=\|===\|==\|=\~\|>>\|>=\|=\@<!>\|\.\.\.\|\.\.\|::\)"
syn match pythonExtraPseudoOperator "\%(-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=\)"
syn match pythonExtraOperator "\%(=\)"
syn match pythonExtraOperator "\%(\*\|\*\*\)"
But now when i'm actually trying to understand what is going on, i'm not so sure what is going on at the first line. There is operators like ===
=~
::
etc. Do i not understand something?
Any thoughts? Does even someone need operators highlight besides me?
Only add builtin operators and group them under one option.
Ok.
Should *
and **
to be highlighted in FunctionParameters for *args and **kwargs? Should their highlight be the same as for multiplication and power operators for simplicity?
Yeah.
Ok.
First
Can we add some variable to enclose new(different from hdima/python-syntax)
self
andcls
in if statement? So people who do not need them can easily disabable their highlight. Myself i actually use this highlight, but we need to think about all users.Second
Do you mind adding extra operators highlight group which you can find in
klen/python-mode
syntax. It looks like thisYou can check more at https://github.com/python-mode/python-mode/blob/develop/syntax/python.vim I think with variable too, so people who need to highlght
=>
==
etc, can turn them on.Thank you.