1
1
Python and Cython language bundles
2
2
==================================
3
3
4
- *** THE MOST POPULAR (AND FEATURE RICH) PYTHON SYNTAX HIGHLIGHTER FOR SUBLIME
5
- ([ OVER 11,000 DOWNLOADS!] ( https://sublime.wbond.net/packages/Python%203 ) )***
4
+ *** THE MOST POPULAR AND MOST FEATURE RICH PYTHON SYNTAX HIGHLIGHTER FOR
5
+ SUBLIME TEXT AS OF TIME,
6
+ [ OVER 75,000 DOWNLOADS] ( https://sublime.wbond.net/packages/Python%203 ) )!***
6
7
7
- This repo is about python 3.3+ and cython 0.19.1+ related bundles for Sublime
8
- Text 2/3 and TextMate editors and for online usage .
8
+ Bleeding-egde Python and Cython syntax highlighters and other goodies for
9
+ Sublime Text 2/3 and TextMate editors.
9
10
10
- ![ Preview] ( img/preview.png )
11
-
12
- Python 3.3
13
- ----------
14
-
15
- Python 3.3 is a truly powerful version of python, with a lot new and creative
16
- features -- and some of them are actually bringing new or different syntaxes!
17
- Unfortunately, the only available and default ` tmLanguage ` syntax-highlight
18
- definition file is pretty old (only supports 2.x) and has several annoying bugs
19
- and unfinished features -- not to mention, that the syntax of the new python
20
- features brake the full highlighting of the entire code.
21
-
22
- I belive, that a good syntax highlighter for software developers has to be as
23
- much help as the auto-completion pop-up or a code linter script in a text
24
- editor.
25
-
26
- That's why I have implemented a new syntax definition from scratch that is
27
- created especially for python 3.3 and above. I did this with pure python
28
- structures, some converters and build scripts. * (I found editing ` JSON ` files
29
- with their ugly double escape characters or editing ` XML ` /` tmLanguage ` s directly
30
- could be pretty annoying on the long run.)*
31
-
32
- The end result is very flexible, dynamic, reuseable and easy to read and write
33
- (syntax highlighted regexes -- with comments and variables). It is also simple
34
- to maintain and pretty short too (the new version is only 35% of the old one)!
35
-
36
- Cython support
37
- --------------
38
-
39
- Unfortunately cython syntax highlighter definitions also lack of updated,
40
- fully-working and 100% python compatible syntax definitions! I have created a
41
- brand-new build-system to combine and convert the highlighter based on the
42
- python one. With this tool, it is quite easy to keep up-to-date both the cython
43
- and the python definitions, and as a plus, I only have to maintain a single
44
- code-base. * Viva la* modularity!
45
-
46
- Highlight on web
47
- ----------------
11
+ * (Or for any other editor, that is using the ` .tmLanguage ` syntax definition)*
48
12
49
- *** WORK IN PROGRESS***
50
-
51
- Previously I wanted to support [ ` Rainbow.js ` ] ( http://craig.is/making/rainbows ) ,
52
- but unfortunately this project hasn't been updated for almost a year now, it
53
- also has several very important, pending, open issues and without these the
54
- proper "translation" from my syntax highlighters to a Rainbow one is impossible.
13
+ ![ Preview] ( img/preview.png )
55
14
56
- Thankfully, there is a new, and very actively developed tool, called the
57
- [ Ace Editor] ( http://ace.c9.io ) . I'm willing to support them, as they are
58
- providing a more feature rich syntax highlighter system, they call it
59
- ` Ace Mode ` . * (Further more, it is very similar to the ` tmLanguage ` system, and
60
- they also provide a tool for automatic ` Mode ` generation from ` tmLanguage ` ,
61
- which is not perfect of course, as they claimed, but still better than
62
- nothing!)*
63
15
64
- > The old, Rainbow-compatible version is still available:
65
- ` etc/archive/js/Python.js ` , but as before, it is still work-in-progress state,
66
- and it is very unlikely that I will finish it and/or support it in the future.
67
16
68
- New is better
69
- -------------
17
+ State of the Art
18
+ ----------------
70
19
71
- Below are some of the most important improvements:
20
+ Below are some of the most important improvements compared to the existing
21
+ syntax highlighters:
72
22
73
23
- Added better number highlighting:
74
24
- All types of floating point notations are working now;
@@ -79,21 +29,32 @@ Below are some of the most important improvements:
79
29
- Declaration rules are extended with ` nonlocal ` .
80
30
- * Ex-statements-now-functions* (like ` print ` ) are updated.
81
31
- New Exception highlighting added.
32
+ - New keywords ` async ` and ` await ` added.
82
33
- Function annotations are now supported.
83
34
- Conventional-language variable ` cls ` added.
84
- - Better regex support (multiline, grouping, comments and more are improved).
35
+ - Optional-comment-based string highlighting:
36
+ - Better regex support (multiline, grouping, comments and more are improved).
37
+ - Format specifier mini-language
38
+ - Template strings
39
+ - Matrix multiplication operator
85
40
- String and byte literals:
86
41
- Byte notation added;
87
42
- Proper string prefixes added.
88
43
- All the unused built-in and magic functions/methods are now removed.
89
44
- All the unused keywords and notations are now removed.
90
45
46
+
47
+
91
48
Future plans
92
49
------------
93
50
94
- - Support format mini-language in strings.
51
+ - Combine optional-comment-based string highlighters, eg. ` # syntax:re+fmt `
52
+ - Add optional-comment-based external language support, eg: ` # syntax:sql ` , for
53
+ starters these should be SQL, HTML and JSON
95
54
- Create a better Twilight-based theme file.
96
55
56
+
57
+
97
58
Installation
98
59
------------
99
60
@@ -129,6 +90,8 @@ repository. Navigate to your `Packages` folder and create a `Python3` and/or a
129
90
folder and copy ` Gloom.tmTheme ` into it. Then go to user-settings, and change
130
91
your old color theme to the new one.*
131
92
93
+
94
+
132
95
Contribute
133
96
----------
134
97
@@ -144,24 +107,31 @@ please use the following conventions when editing the original python files:
144
107
- comment separators can be easily generated with the ` src.utils.separator() `
145
108
function
146
109
110
+
111
+
147
112
Appreciation
148
113
------------
149
114
150
- * Thank you very much @joncle (Jon Clements) for all the support and answers
151
- about python and regexes in general, @kms70847 (Kevin), @Ffisegydd (Keiron
152
- Pizzey), @schesis (Zero Piraeus) and @poke (Patrick Westerhoff) for the
153
- feedbacks, and of course thanks for all the wonderful members of the
154
- [ sopython] ( http://sopython.com ) chat room for supporting me in any ways! May the
155
- Cabbage be with us ;)*
115
+ Thank you very much [ @joncle ] ( https://github.com/joncle ) (Jon Clements) for all
116
+ the support in general, [ @kms70847 ] ( https://github.com/kms70847 ) (Kevin),
117
+ [ @Ffisegydd ] ( https://github.com/Ffisegydd ) (Keiron Pizzey),
118
+ [ @schesis ] ( https://github.com/schesis ) (Zero Piraeus) and
119
+ [ @poke ] ( https://github.com/poke ) (Patrick Westerhoff) for the feedbacks, and of
120
+ course thanks for all the wonderful members of the
121
+ [ sopython] ( http://sopython.com ) chat room for supporting me in any ways! * May
122
+ the Cabbage be with us ;)*
123
+
124
+ I also want to thank for all the loyal users of this package, and especially
125
+ [ @rahul-ramadas ] ( https://github.com/rahul-ramadas ) (Rahul Ramadas) and
126
+ [ @bordaigorl ] ( https://github.com/bordaigorl ) (Emanuele D'Osualdo) who were
127
+ very active on giving me feedbacks, reports, etc.
128
+
156
129
157
- * I also want to thank for all the loyal users of this package, and especially
158
- @rahul-ramadas (Rahul Ramadas) and @bordaigorl (Emanuele D'Osualdo) who were
159
- very active on giving me feedbacks, reports, etc.*
160
130
161
- LICENSE
131
+ License
162
132
-------
163
133
164
- Copyright (C) 2013 - 2014 Peter Varo
134
+ Copyright (C) 2013 - 2017 Peter Varo
165
135
166
136
This program is free software: you can redistribute it and/or modify it under
167
137
the terms of the GNU General Public License as published by the Free Software
0 commit comments