Book Image

Mastering Sublime Text

By : Dan Peleg
Book Image

Mastering Sublime Text

By: Dan Peleg

Overview of this book

Sublime is the leading platform for developing websites, applications, and software. Sublime Text is a sophisticated, cross-platform text and source code editor. It supports a number of different programming languages and is extremely efficient and feature rich. With Sublime Text, programmers can develop their web applications faster and with more efficiency. This book will put you at the frontier of modern software development. It will teach you how to leverage Sublime for anything from mobile games to missile protection. Above all, this book will help you harness the power of other Sublime users and always stay on top. This book will show you how to get started, from basic installation through lightning fast code navigation and up to the development of your own plugins. It takes you from the early stages of navigating through the platform and moves on by teaching you how to fully customize your platform, test, debug, and eventually create and share your own plugins to help and lead this community forward. The book will then teach you how to efficiently edit text, primarily by using the keyboard. You will learn how to interact with the Sublime Text community using the mailing lists and IRC.
Table of Contents (15 chapters)
Mastering Sublime Text
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Installing the Package Control ASAP


We learned that Sublime has Packages that help us customize our Sublime experience. But how can we find the packages that suit our needs? And how do we install different packages? That's why we have Package Control https://sublime.wbond.net/The Package Control is a non-official open source plugin that lets us navigate through thousands of mainly open source packages ready to install! There are some closed source (commercial) plugins available, such as Sublimemerge and SFTP.

Let's start by installing the Package Control plugin into Sublime. We do it by opening the console Ctrl + ` and copying the following code:

import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read()) 

Tip

If you are having trouble installing the Package Control ASAP using the preceding code, please visit http://sublime.wbond.net/installation.

This code will download the Package Control package and place it inside the Installed Packages directory. After it has finished installing, open the command palette and navigate to Package Control | Install Package. Then press Enter and you will notice Loading repositories [ = ] in the status bar.

After it finishes loading, a new window will open with all the packages available for instant installation!

What we see in this screenshot is the package title, description, version, and the repository link. To install, simply press Enter and the new installed features will appear in the command palette.