Python Language Bundle
for TextMate 1.5.8
KHI End User License Agreement:
I’m sure you don’t like reading these stupid things any more than I like writing them, so we’ll keep it short and sweet:
- This software is provided to you, for your own personal, private use, without any kind of warranty or promise of support whatsoever.
- You are licensed to use this software, not to distribute it or sell it. I ask that you please not mirror any files which I have not explicitly relinquished my exclusive copyright to anywhere without prior authorization.
Sound cool to you?
TextMate is pretty cool, but nobody who works on the darn thing uses Python at all, so its support in this department is notably lacking. In the interest of providing more meaningful syntax highlighting, I hot-rodded the stock Python bundle with the following changes:
- Removed the bizarre dotted-name definition which interfered with more things than you could ever want to shake a stick at.
- Removed classmethod and staticmethod from the list of "support" keywords so that they correctly show up as function decorators when used as such.
- Added self and cls to the list of language keywords (yes, I know that they aren’t actually keywords, but it looks better).
- Removed all code-folding markers. They don’t work because regular expressions don’t work as language parsers. Period. Stop wasting time trying, guys.
- Greatly simplified meta.function-call.python so that it correctly matches actual function calls and not the entire accessor path plus parentheses.
- Fixed automatic block commenting so it no longer screws up your code’s indentation. This is kinda important since Python blocks are defined by friggin’ indentation.
Maybe you’ll like these modifications, maybe you won’t. I personally think it makes Python code look better, especially when used in conjunction with my deep purple-y theme Dominion Day which colors all these things in real purdy like.