Macro is a rule or pattern, or grammar replacement. So how to set macros in sublime? Below, the sublime usage tutorial column will explain how to set macros in sublimetext3. I hope it will be helpful to friends in need!
sublime text 3How to set macros?
Definition of macro
Generally speaking, a macro is a rule or pattern, or syntax replacement, used to describe a specific input ( How to convert (usually a string) into the corresponding output (usually a string) according to predefined rules. This replacement is performed during precompilation and is called macro expansion
The role of macro
So much nonsense above, in fact, it is to use "one key" instead of "multiple keys", which is the same as encapsulation
How to implement macros in Sublime_text_3
Example: After pressing =, realize the equal sign with spaces on both sides
1. Start recording
Click Tools->Record Macro to start recording the macro. (You can also use the shortcut key ctrl Q )
2. Record
Find a file and write "space=space" //In fact, it is the rule or pattern to be implemented
3.End recording
Tools->Stop Recoding Macro (actually the button to start recording, so you can also use ctrl Q)
4. Save Macro
Operation: Tools->Save Macro
Personal habits are saved in your sublime/Data/User/Macoro (create if not)/your_filename.sublime-macro
Here we assume that we save your sublime/Data/User/Macoro/equal .sublime-macro
5. Add shortcut keys to the recorded macro
Preferences->Key bindings
Type the following content
{ "keys":["="],"command":"run_macro_file","args":{"file":"Packages/user/Macoro/equal.sublime-macro"} }
The above is the detailed content of How to set macros in sublime text 3?. For more information, please follow other related articles on the PHP Chinese website!

SublimeText is faster and suitable for pursuing speed and lightweight experiences; VSCode performs better than handling large projects, suitable for needing scalability and community support. 1.SublimeText starts quickly, is written in C, and the interface is simple. 2. VSCode handles large-scale projects well, relies on the Electron framework, and expands the ecosystem strongly.

Choosing SublimeText or VSCode depends on personal needs: 1. SublimeText is suitable for users who pursue lightweight and efficient editing. It starts quickly but requires a license to purchase. 2. VSCode is suitable for users who need powerful debugging and rich plug-ins. It consumes high resources but is open source and free.

SublimeText and VSCode have their own advantages in plug-in ecology and scalability. SublimeText manages plug-ins through PackageControl, which have a small number of plug-ins but high quality, and mainly uses Python script extensions. VSCode has a huge Marketplace, with a large number of plug-ins and frequent updates. It uses TypeScript and JavaScript to expand, and its API is more comprehensive.

The license price of SublimeText is $99, which is worth buying because: 1) it provides an efficient editing experience and improves work efficiency; 2) it has a rich plug-in ecosystem to meet personalized needs; 3) it supports cross-platform use and is suitable for different operating systems; 4) it can receive continuous updates and technical support after purchase.

SublimeText is a powerful and highly customizable editor. 1) It supports multiple programming languages and provides functions such as multi-line editing, code folding, etc. 2) Users can customize through plug-ins and configuration files, such as using PackageControl to manage plug-ins. 3) Its underlying layer is based on Python, supports multi-threading and GPU acceleration, and has excellent performance. 4) Basic usage includes shortcut key operations, and advanced usage involves macros and Snippets. 5) Frequently asked questions such as failure to install the plug-in, it can be solved by checking the network and updating it. 6) Performance optimization suggestions include cleaning up plug-ins and using cache reasonably.

SublimeText's license is a permanent digital key that unlocks all features and removes trial tips. After purchase, it is activated through the official website. The same key can be used for personal use by multiple devices, so you must avoid violations of the terms of use.

PackageControl improves the development experience of SublimeText through the following steps: 1. Install PackageControl and use a few lines of command to complete it. 2. Access PackageControl through shortcut keys or menus to install, update and delete plug-ins. 3. Regularly clean and update plug-ins to optimize performance and improve development efficiency. Through these operations, developers can focus on programming and improve the overall development experience.

SublimeText's project management function can efficiently organize and navigate the code base through the following steps: 1. Create a project file and save the .sublime-project file using SaveProjectAs in the Project menu.... 2. Configure project files, specify the included folders and settings, such as excluding specific files or setting up the build system. 3. Open the project file and quickly load the project environment through OpenProject in the Project menu. 4. Optimize project files to avoid including too many folders, and use the exclusion mode to improve navigation speed. Through these steps, you can use SublimeText's project management capabilities to improve development efficiency and code quality.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Notepad++7.3.1
Easy-to-use and free code editor

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.