Cython+
Python 3 and Cython language bundles for Sublime Text and TextMate
Details
Installs
- Total 13K
- Win 6K
- Mac 3K
- Linux 4K
Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 2 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 2 | 1 | 1 | 0 | 0 | 0 | 0 | 4 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 | 1 |
Mac | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
Readme
- Source
- raw.githubusercontent.com
Python and Cython language bundles
THE MOST POPULAR AND MOST FEATURE RICH PYTHON SYNTAX HIGHLIGHTER FOR SUBLIME TEXT WITH OVER 450,000+ DOWNLOADS AND BEING IN THE TOP 100 PACKAGES)!
Bleeding-egde Python and Cython syntax highlighters and other goodies for Sublime Text 2/3 and TextMate editors.
(Or for any other editor, that is using the .tmLanguage
syntax definition)
State of the Art
Below are some of the most important improvements compared to the existing syntax highlighters:
- Added better number highlighting:
- All types of floating point notations are working now;
- All types of complex number notations are working now;
- New types of binary and octal-number notations are supported;
- Long integer is removed.
- The
...
syntax notation ofEllipsis
is supported now. - Declaration rules are extended with
nonlocal
. - Ex-statements-now-functions (like
print
) are updated. - New Exception highlighting added.
- New keywords
async
andawait
added. - Function annotations are now supported.
- Conventional-language variable
cls
added. - Optional-comment-based string highlighting:
- Better regex support (multiline, grouping, comments and more are improved).
- Format specifier mini-language
- Template strings
- Matrix multiplication operator
- String and byte literals:
- Byte notation added;
- Proper string prefixes added.
- All the unused built-in and magic functions/methods are now removed.
- All the unused keywords and notations are now removed.
Future plans
- Create a better Twilight-based theme file.
Installation
Via Package Control
The fastest and easiest way to install these packages for Sublime Text is the following:
- Install Package Control
- Open
Tools
→Command Palette
- Select
Package Control: Install Package
- Search for
Python 3
andCython+
packages and install them - Happy coding ;)
Set as default
After you installed the language definition file successfully, all you have to
do is assign the .py
files to always open with this syntax highlighter. Go to
View
→ Syntax
→ Open all with current extension as...
→ Python 3
To remove this setting, you can always overwrite this preference.
Manual installation
Download the tmLanguage
files from the python and Cython branches of this
repository. Navigate to your Packages
folder and create a Python3
and/or a
Cython
folder(s) and copy the tmLanguage
and sublime-build files into.
Theme file
If you want to use my Work-In-Progress theme file: navigate to Packages/User
folder and copy Gloom.tmTheme
into it. Then go to user-settings, and change
your old color theme to the new one.
Contribute
Any help is appreciated and more than welcome – my goal is to make this the 'de facto' language bundle for python 3. If you want to submit a change, please use the following conventions when editing the original python files:
- variables uses
underscore_separated_names
; - all files uses 4 spaces for indentation;
=
and:
operators are aligned if length of variable names are similar;(
,[
and{
start a new line, if possible and reasonable;- each line must fit in the width 80 columns (code, text, etc.);
- comment separators can be easily generated with the
src.utils.separator()
function
Appreciation
Thank you very much @joncle (Jon Clements) for all the support in general, @kms70847 (Kevin), @Ffisegydd (Keiron Pizzey), @schesis (Zero Piraeus) and @poke (Patrick Westerhoff) for the feedbacks, and of course thanks for all the wonderful members of the sopython chat room for supporting me in any ways! May the Cabbage be with us ;)
I also want to thank for all the loyal users of this package, and especially @rahul-ramadas (Rahul Ramadas) and @bordaigorl (Emanuele D'Osualdo) who were very active on giving me feedbacks, reports, etc.
License
Copyright © 2013 - 2017 Peter Varo
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program, most likely a file in the root directory, called 'LICENSE'. If not, see http://www.gnu.org/licenses.