Re:MagicStack: Python syntax highlighter for Sublime Text an...
by 1st1 on Monday October 19, 2015 @06:31PM
(#10416259)
I'm one of the authors, ama.
[ Parent
| on HN ]
Re:MagicStack: Python syntax highlighter for Sublime Text an...
by 0942v8653 on Monday October 19, 2015 @06:55PM
(#10416354)
Does this allow highlighting function names in function calls? PythonImproved[0] does this (see lines 9 and 23 of [1]).
[0]: https://github.com/MattDMo/PythonImproved
[1]: https://packagecontrol.io/readmes/img/048b2068c7a455f3796334...
Re:MagicStack: Python syntax highlighter for Sublime Text an...
by 1st1 on Monday October 19, 2015 @06:58PM
(#10416365)
Yeah, should be fairly easy to add. Please submit an issue!
Re:MagicStack: Python syntax highlighter for Sublime Text an...
by knite on Monday October 19, 2015 @07:26PM
(#10416480)
Could you compare/contrast MagicStack with PythonImproved generally? Would love to know if MS is strictly better.
Re:MagicStack: Python syntax highlighter for Sublime Text an...
by 1st1 on Monday October 19, 2015 @07:31PM
(#10416498)
Try to add this snippet anywhere in your code:
r'('
Besides broken regexps, PythonImproved still doesn't highlight async/await, highlights raw docstrings as regexps, incorrectly handles implicit line continuations in function parameter annotations, etc.Edit: here's an issue that documents some differences [1]
Re:MagicStack: Python syntax highlighter for Sublime Text an...
by knite on Tuesday October 20, 2015 @10:04PM
(#10423169)
Why is the issue closed and locked?
Re:MagicStack: Python syntax highlighter for Sublime Text an...
by 1st1 on Monday October 19, 2015 @11:29PM
(#10417254)
Fixed in v0.4.21!
Re:MagicStack: Python syntax highlighter for Sublime Text an...
by dmishe on Monday October 19, 2015 @07:25PM
(#10416477)
What are the advantages over built-in syntax highlight in sublime text?
Re:MagicStack: Python syntax highlighter for Sublime Text an...
by 1st1 on Monday October 19, 2015 @07:30PM
(#10416496)
To name a few, we highlight correctly async/await, function annotations, very complex regexps, all kinds of unicode|byte|raw string literals (and new/old style formatting), docstrings, reserved words in improper contexts etc. Most importantly, MagicPython doesn't break where builtin sublime syntax fails, try this snippet for instance:
def foo() -> int:
return a
Re:MagicStack: Python syntax highlighter for Sublime Text an...
by dmishe on Tuesday October 20, 2015 @01:01PM
(#10420353)
Noted, thanks
Re:MagicStack: Python syntax highlighter for Sublime Text an...
by jolux on Monday October 19, 2015 @09:23PM
(#10416899)
A bit off topic, but what theme and color scheme are you using in your Sublime Text screenshot?
Re:MagicStack: Python syntax highlighter for Sublime Text an...
by 1st1 on Monday October 19, 2015 @09:30PM
(#10416912)
Here it is: [1]
For now it has to be installed manually. I'll submit it to Package Control and create an Atom version soon.
Re:MagicStack: Python syntax highlighter for Sublime Text an...
by jolux on Monday October 19, 2015 @09:31PM
(#10416916)
Much thanks!