How to use Sublime? Introduction and use of Sublime
The following column sublime tutorial will introduce how to use Sublime, so that everyone can understand what Sublime is and how to use Sublime. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
Sublime Introduction
Sublime Text is a code editor and an advanced text editor for HTML and prose. Sublime Text was developed by programmer Jon Skinner in January 2008. It was originally designed as a Vim with rich extension functions.
Sublime installation
is very simple, just download the corresponding system version from the official website. There is a problem. The official website seems to be very unfriendly to mainland Internet users. It is inaccessible, so you have to manually laugh. After installation, it is actually a trial version installed. How to crack:
Enter license:
—– BEGIN LICENSE —– TwitterInc 200 User License EA7E-890007 1D77F72E 390CDD93 4DCBA022 FAF60790 61AA12C0 A37081C5 D0316412 4584D136 94D7F7D4 95BC8C1C 527DA828 560BB037 D1EDDD8C AE7B379F 50C9D69D B35179EF 2FE898C4 8E4277A8 555CE714 E1FB0E43 D5D52613 C3D12E98 BC49967F 7652EED2 9D2D2E61 67610860 6D338B72 5CF95C69 E36B85CC 84991F19 7575D828 470A92AB
As mentioned above, the power of sublime’s plug-ins is mentioned. Sublime uses package control to uniformly manage installed plug-ins. It seems that the newer version of sublime 3 comes with the package control function by default after activation, so there is no need to install it yourself. In fact, it is very simple to install the package control function:
Open view-show console, open a terminal window similar to terminal, enter the following content to install package control:
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())
After the installation is completed, close sublime, restart. The shortcut key command shift p brings up the small plug-in installation window, click install package, enter the plug-in you want to install, such as gist, and press Enter.
Chinese font display is abnormal
As shown below, sublime text Chinese display is abnormal:
Looks uncomfortable.
Solution: Change fonts. Programmers all have their own fonts. Personally, I prefer Yahei Consolas Hybrid. It is obviously a mixture of two fonts. It is synthesized from Microsoft Yahei’s Chinese font and Consolas’ English font. Consolas Font is a font developed by Microsoft specifically for programmers.
Setting method: preference——settings, open a json file, add k-v key-value pair:
"font_face":"Yahei Consolas Hybrid"
First make sure you have this font installed on your computer. Download address: http://cloud.alphadn.com/blog/yahei-consolas.zip.
Basic functions
Sublime already has its own code formatting function: Edit -> Line -> Reindent.
The built-in code formatting tool sometimes feels insufficient. For json or xml file content, if you want to see the formatted directory level display content at a glance, you can also install a plug-in, such as indent xml. Sometimes some plug-ins cannot be found in package control. In this case, another way to install the plug-in is needed, by entering the plug-in address. See below for details.
Must-have shortcut keys
sublime installation plantUML tool
PlantUML is a tool for quickly creating UML Graphical components, often used in the design and development of UML diagrams. Whether it is a Mac or Windows platform, to use the drawing function of plantUML, you need to install graphviz first. For the Mac platform, it can be done with one command:
brew install graphviz
Because in sublime's default package manager repository (?), package control Plantuml cannot be found in it, so you need to enter the configuration source yourself (the concepts are all interoperable, similar to npm?).
Steps:
Shortcut key command shift p, enter add repository, find Package Control:Add Repository, enter https://github.com/jvantuyl in the input box that appears below /sublime_diagram_plugin.git, then press Enter and wait for the installation to complete, then restart.
The installation is completed. For a UML text (that is, the text contained between @startuml and @enduml), the shortcut key command m can call up the graphviz renderer to complete the identification and rendering of the text content. Finally drawing. So here’s the problem. The command m shortcut key is the minimized shortcut key on the Mac platform by default.
How to change the shortcut key mapping?
Open Preferences -> Key Binding - User, add a shortcut key:
{"keys":["command+d"],"command":"display_diagrams"}
Configure to hold down Alt d to generate a PlantUML image.
sublime Install a simple go language development environment
Thanks to the popularity of cloud computing, the go language has shined. I’m not sure what the best go language development environment IDE is. After all, I’m not a go language developer. I just debug small projects in my spare time. intellij IDEA performs well, I don’t know about others.
Of course, sublime can also build a go language development environment, but its functions are relatively limited.
sublime text comparison function
In work, it is inevitable to compare the differences between two texts. For simple text comparison, you can use online tools,https://www.diffchecker.com/. For complex text comparisons of large-scale projects involving more than a dozen files, folders as deep as three or four levels, and hundreds or even thousands of files, online tools are obviously not up to the task. I think beyond compare is the best text comparison tool.
The above is the detailed content of How to use Sublime? Introduction and use of Sublime. For more information, please follow other related articles on the PHP Chinese website!

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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

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

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

To open HTML files you need to use a browser such as Google Chrome or Mozilla Firefox. To open an HTML file using a browser, follow these steps: 1. Open your browser. 2. Drag and drop the HTML file into the browser window, or click the File menu and select Open.

IDLE and Jupyter Notebook are recommended for beginners, and PyCharm, Visual Studio Code and Sublime Text are recommended for intermediate/advanced students. Cloud IDEs Google Colab and Binder provide interactive Python environments. Other recommendations include Anaconda Navigator, Spyder, and Wing IDE. Selection criteria include skill level, project size and personal preference.

Here are the steps to use copied code in Python: Copy and paste the code into a text editor. Create a Python file. Run the code from the command line. Understand what the code is for and how it works. Modify the code as needed and rerun it.

HTML can be used to open local files as follows: Create a .html file and import the jQuery library. Create an input field that allows the user to select a file. Listen to the file selection event and use a FileReader() object to read the file contents. Display the read file contents on the web page.

Steps to create a .py file in Python: Open a text editor (such as Notepad, TextMate, or Sublime Text). Create a new file and enter the Python code, paying attention to indentation and syntax. When saving the file, use a .py extension (for example, my_script.py).

HTML files can be opened using a browser (such as Chrome, Firefox, Edge, Safari, Opera): find the HTML file (.html or .htm extension); right-click/long-press on the file; select "Open"; select the file you want to use browser.

Create an HTML document: Use a text editor to enter the HTML structure and save it as an .html file. Open an HTML document: Double-click the file or use the File > Open option in your browser. Practical case: Create a new HTML file, add a title, style sheet and content, and save it as an .html file.

To sum up, the following HTML editors are highly praised: Visual Studio Code: Cross-platform, feature-rich, free and open source. Sublime Text: High performance, highly customizable, paid software. Atom: cross-platform, scalable, open source and free. Brackets: dedicated for front-end development, intuitive interface, open source and free. Notepad++: lightweight, fast, powerful, open source and free. When choosing an HTML editor, consider factors such as platform compatibility, functionality, extensibility, price, and user-friendliness.
