+29

Python punctuation support in syntax coloring

Łukasz Langa 12 років тому 0
Sublime Text 2 is using TextMate color schemes. This implementation has a bunch of drawbacks WRT Python support. I found three problems with punctuation described by the screenshot below:

Python syntax punctuation problems

Larger version of the screenshot available here: https://dl.dropbox.com/u/4830253/sublimetext_python_syntax.png

TextMate behaves the same in all cases. If compatibility is more important than solving the problem, so be it. However, I would suggest solving those problems by:

1. supporting punctuation.separator.parameters.python for function calls and punctuation.separator.tuple.python/punctuation.separator.set.python for the respective data structures
2. adding punctuation.section.block.begin.python analogical to punctuation.section.class.begin.python
3. identifying asterisks in function definitions as keyword.operator.arithmetic.python OR adding keyword.operator.unpacking.python