
- Sublime Text Tutorial
- Sublime Text - Home
- Sublime Text – Introduction
- Sublime Text – Installation
- Sublime Text – Data Directory
- Creating First Document
- Editing First Text Document
- Patterns of Code Editing
- Sublime Text – Sublime Linter
- Sublime Text – Shortcuts
- Sublime Text – Snippets
- Sublime Text – Macros
- Sublime Text – Key Bindings
- Sublime Text – Column Selection
- Sublime Text – Indentation
- Sublime Text – Base Settings
- Sublime Text – Theme Management
- Understanding Vintage Mode
- Sublime Text – Vintage Commands
- Sublime Text – Testing Javascript
- Sublime Text – Testing Python Code
- Sublime Text – Spell Check
- Sublime Text – Packages
- Sublime Text – Menus
- Sublime Text – Sub Menus of Font
- Sublime Text – Developing Plugin
- Sublime Text – Command Palette
- Debugging PHP Application
- Debugging Javascript Application
- Sublime Text – Batch Processing
- Distraction Free Mode
- SublimeCodeIntel Plugin
- Sublime Text Useful Resources
- Sublime Text - Quick Guide
- Sublime Text - Useful Resources
- Sublime Text - Discussion
Sublime Text - Macros
Macros are the basic automation facility that includes a sequence of commands. You can use macros whenever you need to perform an operation which includes same steps.
Macro files are JSON files with an extension called .sublime-micro and are considered to be very helpful.
Recording a Macro
Recording a macro defines the procedure to keep a set of commands needed for the given file. You can record a macro in two ways −
Use the shortcut key Ctrl+Q for recording a macro in Windows and Cmd+Q in Mac.
Use the record option in Tools → Record Macro.

Once the macro has started recording, you can see the following message in Sublime Text editor −

Playing a Macro
You can use the shortcut key Ctrl+Shift+Q on Windows and Cmd+Shift+Q for Mac, to play a macro recorded by the user in Sublime Text. Note that this shortcut plays the last recorded macro in Sublime.
Saving a Macro
You can save a recorded macro using the option Tools → Save Macro. The following screenshot shows how to save a macro using this option.

You can also redefine the macros using various options in Tool menu bar, as shown below −
