Sublime Text


I’ve decided to write some amazing applications in Python this year. Sublime Text (ST) is my favorite editor, known for its clean interface,  speed, and cool plugins. As such ST isn’t an IDE (Integrated Development Environment), however plugins are available to turn it into one (perhaps even better!).

ST3 can be downloaded from its official site. Note that the unregistered ST3 doesn’t have any expiration date and I recommend you to buy the license. It’s truly worth it.

The first thing is to install the Sublime Package Control which is a package management plugin for ST. To do that open the console of ST (Ctl+`) and paste the following code and hit enter.

import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( '' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)

Restart the ST and keybording Ctl+Shift+P should open up the Command Palette. And type install to get a list of the plugins.



Here are a list of few  best known plugins (I’ll be adding more as I discover the new ones).

  1. SublimeCodeIntel : A smart, context sensitive autocomplete plugin.
  2. SublimeLinter: A linting framework for linting plugins. A linter is a small program that checks code for stylistic or programming errors. Programming is hard. We are bound to make mistakes. The big advantage of using SublimeLinter is that your code can be linted as you type (before saving your changes) and any errors are highlighted immediately, which is considerably easier than saving the file, switching to a terminal, running a linter, reading through a list of errors, then switching back to Sublime Text to locate the errors!
  3. Pyflakes and Pep8SublimeLinter is a framework for ST3 linters. The package itself does not include any actual linters; those must be installed separately via Package Control using the SublimeLinter-[linter_name] naming syntax. For Python linting I use Pyflakes and Pep8.
  4. Emmet : Intelligent code substitution and expansion plugin
  5. Bracket Highlighter : Matches a variety of brackets such as: [], (), {}, "", '', #!xml <tag></tag>, and even custom brackets.
  6. Sidebar Enhancements : Provides enhancements to the operations on Sidebar of Files and Folders.

Plus I liked the Dayle Rees color scheme and Predawn dark theme shown by Corey Schafer in this video.

About Deepak Devanand

Seeker of knowledge
This entry was posted in Python and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s