search
HomeWeb Front-endHTML TutorialShare an editor you use--Sublime Text

Share an editor you use--Sublime Text

Jul 03, 2017 am 10:50 AM
front endeditor

When many people enter the front-end learning field (including myself), in addition to choosing to learn the appropriate technology, they also need to have a (自)心(自)狠(自)心(自)义(愿)手(爱) development tools, a handy development tool can not only greatly improve your efficiency, but also make you feel comfortable when writing code O(∩_∩)O.

My first front-end development tool is Sublime Text. Let me talk about my understanding of it.

When I was learning front-end, I, like many people, searched online for what kind of development tools should I choose for front-end development. After searching, almost most of the results recommended Sublime. , so I downloaded one, and when I opened it after downloading, I saw that the black form was not gorgeous at all (the Chinese translation of sublime is "gorgeous"). Later, I thought about it and searched Baidu online for a while, and finally understood One of the important reasons why so many people say sublime is easy to use is its "customizability", means everything you want in sublime , all can be customized and chosen by yourself. Change it yourself; and another feature: shortcut keys to quickly writeSome people may ask, isn't this just messing around? Everything needs to be done by yourself and fiddled with by yourself. However, when you write the code yourself later, you will understand that all this "faffing around" is necessary. It is very fast to use Sublime to write some simple demo pages. However, Sublime also has obvious shortcomings. It is not convenient for project management and the code prompts are not as powerful as other IDEs.

1. Cross-platform editor.

It also supports Windows, Linux, Mac OS X and other operating systems. It is a lightweight editor and supports various programming languages.

2. Sublime’s plug-in mechanism.

(I won’t go into details here on how to install plug-ins. There are many good articles on the Internet) To be honest, you don’t need to install too many plug-ins. If you install too many plug-ins, you might as well use a professional IDE ( Integrated development environment), let me share a few plug-ins that I use easily; the same sublime plug-in can be installed on either a Windows system or a Mac system after manually downloading it.

Emmet

Emmet This is necessary, html It can provide quick smart tips for css and js, and also provides various shortcut keys for quickly generating page html page skeleton.

   

 

Sublime Server

##The way sublime itself browses the page, By default, the page is accessed using the file path instead of http localhost:8080/, which can easily cause some file path errors.

After installing the Sublime Server plug-in, you can use http to access the page. After installation, open it in "Tools - sublime server - star sublime server". After that, right-click on the page and "View in sublimer", you can get

Andy JS2

The Emmet plug-in mentioned above has limited support for JavaScript code prompts. Therefore, you can install the AndyJS2 plug-in to make up for this defect, since this plug-in can no longer be found in the package management tool, you can manually download the plug-in at the download address: After downloading, directly copy the files in the folder to "Preferences - Package", now the installation is complete

At this time, if you write JS code again, you will find that there are many other smart prompts.

Some people may say that it is not necessary to install so many plug-ins for smart prompts. Why use it for sublime? It is better to use an IDE, such as Webstorm or visual studio. However, if If you are a newbie and want to be more familiar with some syntax and code, then please try sublime, this "gorgeous smart prompt" O(∩_∩)O

##ConverToUTF8

If the page is garbled, you can install this plug-in to remove the garbled code. This is also a necessary plug-in.

AllAutoComplete and PackageResourceViwer

For smart prompts for files in folders, you can set CSS class name prompts by modifying sublime's default configuration. There is a great tutorial address on Zhihu as follows

You can also use PackageResourceViwer to modify the style and font size of the sublime sidebar

These are plug-ins installed by bloggers themselves

##3. Sublime’s own shortcut keys for quick writing

(1) As mentioned above, cooperate with Emmet to quickly generate the page skeleton

Note that you must first Click the lower right corner

to select "HTML" format or "ctrl + s" to save the page first

Write html:xt on the blank page //Press the tab key on the keyboard. Generate the page skeleton of xhtml

##Write html:5 on the blank page //Just press the tab key on the keyboard Generate the page skeleton of html5

(2)html, CSS, shortcut syntax

There are many, many similar syntaxes. Here are a few commonly used ones. The rest can be found by searching online. There are many.

(3) Edit across lines

Method: In the text that needs to be edited, press and hold the mouse wheel key. Note that it is to press and hold Press the mouse wheel button, and then pull the mouse down to the line of text that needs to be edited. A vertical line will appear. At this time, you can start editing, as shown in the figure

For myself, Sublime Text is indeed a good code editor. In the future, I will write about two other editors that I also like very much, Visual Studio Code and IDE Webstorm.

This is the first long blog post. I have to say that writing a blog is indeed a tiring task. It is almost the same as writing a report in school. However, you can review the past and learn the new. It reminds me of a lot of things I learned and came into contact with before, which is a good thing O(∩_∩)O Ha!

The above is the detailed content of Share an editor you use--Sublime Text. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Explain the importance of using consistent coding style for HTML tags and attributes.Explain the importance of using consistent coding style for HTML tags and attributes.May 01, 2025 am 12:01 AM

A consistent HTML encoding style is important because it improves the readability, maintainability and efficiency of the code. 1) Use lowercase tags and attributes, 2) Keep consistent indentation, 3) Select and stick to single or double quotes, 4) Avoid mixing different styles in projects, 5) Use automation tools such as Prettier or ESLint to ensure consistency in styles.

How to implement multi-project carousel in Bootstrap 4?How to implement multi-project carousel in Bootstrap 4?Apr 30, 2025 pm 03:24 PM

Solution to implement multi-project carousel in Bootstrap4 Implementing multi-project carousel in Bootstrap4 is not an easy task. Although Bootstrap...

How does deepseek official website achieve the effect of penetrating mouse scroll event?How does deepseek official website achieve the effect of penetrating mouse scroll event?Apr 30, 2025 pm 03:21 PM

How to achieve the effect of mouse scrolling event penetration? When we browse the web, we often encounter some special interaction designs. For example, on deepseek official website, �...

How to modify the playback control style of HTML videoHow to modify the playback control style of HTML videoApr 30, 2025 pm 03:18 PM

The default playback control style of HTML video cannot be modified directly through CSS. 1. Create custom controls using JavaScript. 2. Beautify these controls through CSS. 3. Consider compatibility, user experience and performance, using libraries such as Video.js or Plyr can simplify the process.

What problems will be caused by using native select on your phone?What problems will be caused by using native select on your phone?Apr 30, 2025 pm 03:15 PM

Potential problems with using native select on mobile phones When developing mobile applications, we often encounter the need for selecting boxes. Normally, developers...

What are the disadvantages of using native select on your phone?What are the disadvantages of using native select on your phone?Apr 30, 2025 pm 03:12 PM

What are the disadvantages of using native select on your phone? When developing applications on mobile devices, it is very important to choose the right UI components. Many developers...

How to optimize collision handling of third-person roaming in a room using Three.js and Octree?How to optimize collision handling of third-person roaming in a room using Three.js and Octree?Apr 30, 2025 pm 03:09 PM

Use Three.js and Octree to optimize collision handling of third-person roaming in the room. Use Octree in Three.js to implement third-person roaming in the room and add collisions...

What problems will you encounter when using native select on your phone?What problems will you encounter when using native select on your phone?Apr 30, 2025 pm 03:06 PM

Issues with native select on mobile phones When developing applications on mobile devices, we often encounter scenarios where users need to make choices. Although native sel...

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft