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

Recording, editing, and using macros


Macros can be very helpful; they are saved with the .sublime-macro extensions as a JSON-formatted file.

Before creating a new macro, we should understand what the use case is. If we find ourselves doing the same actions over and over again, we should use a macro for it. For example, when writing C# code, we always go to the end of the line to insert a semicolon and press Enter. How can we do this faster?

Recording a macro

To record a macro, simply press Ctrl + Q on Windows or Linux and Control + Q on OS X. We will notice that the status bar says Starting to record macro…, as shown in the following screenshot:

Let's record the macro. Press Ctrl + right arrow + ; + Enter on Windows or Linux and Command + Right Arrow + ; + Return on OS X. Finally, press Ctrl + Q to stop recording.

Playing a macro

To play the recorded macro, simply press Ctrl + Shift + Q on Windows or Linux and Control + Shift + Q on OS X. Sublime will always play the last recorded macro.

Saving...