Detailed installation of Sublime Text 3 and its plug-ins

1. Introduction to Sublime Text 3

1.1 Getting to know Sublime Text 3

Because I don't like to use text documents to view code files such as java, html, CSS, etc. (the content is messy, the code cannot be formatted), I started to find related software that can replace them on the Internet, and then I found Sublime Text 3. Yes, I used Sublime as a replacement for text documents from the beginning. Later, as I used it for a long time, and after I learned more about it (plugins are really good to use), I started writing front-end code with Sublime.

1.1 What is Sublime Text 3

I won't talk about the specific introduction. I'm not a professional, just look at Du Niang.

Sublime Text is a text editor (paid software, can be tried indefinitely, but there will be an activation prompt pop-up window), but also an advanced code editor. Sublime Text was developed by programmer Jon Skinner in January 2008. It was originally designed as a Vim with rich extensions.
Sublime Text has a beautiful user interface and powerful features, such as code thumbnails, Python plug-ins, code snippets, etc. You can also customize the key bindings, menus and toolbars. The main functions of Sublime Text include: spell check, bookmarks, complete Python API, Goto function, instant project switching, multiple selection, multiple windows and so on. Sublime Text is a cross-platform editor that also supports Windows, Linux, Mac OS X and other operating systems

--Baidu Encyclopedia

can be seen:

  1. Although Sublime is a paid software, it can be tried indefinitely, so you can download and try it first.
  2. Sublime has a beautiful appearance, and functions such as code thumbnails. To be honest, I use it because of its appearance hahaha.

Second, the installation of Sublime

2.1 Download

It is recommended that you go to the official website to download. Anyway, the genuine version can be tried indefinitely. Isn't it beautiful to download on the official website? Official website: Download-Sublime Text,
Insert picture description here
everyone can choose according to the version of your computer. My computer is Win10 64 bit, so I just choose the Windows 64 bit version.

2.2 Installation

Just keep going to the next step, very easy!

Three, the installation of Package Control

Package Control is very important. If you want to search and download powerful plug-ins online, you must install Package Control first.
There are two ways to install Package Control :

3.1 Console installation

  1. Open Sublime
  2. Open the console, View>Show Consoleor shortcut key ctrl + `
    Insert picture description here
  3. Type in the console
import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.cn/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)

Insert picture description hereAfter pressing Enter, there will be a thing swinging left and right in the lower left corner of Sublime, indicating that it is downloading. After it disappears, the download is complete.

3.2 Download the installation package and import

Download address: After the Installation-Package Control
Insert picture description here installation package is downloaded, open Sublime, select the Preferences > Browse Packagesmenu, and copy the downloaded file to the Installed Packages folder (if not, create a new one). Finally, restart Sublime.

3.3 Successful installation display

If Package Control appears in Preferences , the installation is successful.
Successful installation

Fourth, Package Control method of installing plug-ins

Press to ctrl + shift + pbring up the management interface (it will be slow to open for the first time, just wait a while),
enter install package, press Enter,
and then enter the name of the plug-in to be installed.

Five, the solution to the failure of Package Control to install the plug-in

Since the installation is downloaded through packagecontrol.io, and packagecontrol.io is easily walled,
it may cause the plug-in download to fail, which can be solved by the following methods.

  1. Open https://packagecontrol.io/channel_v3.json , right-click and save as, save the json file (this file will be used later, remember the file path)
  2. Open the Package Control configuration file:Preferences > Package Settings > Package Control > Settings - User
    Insert picture description here
  3. Enter the following code in the configuration file:
{
    
    
    "channels": [
        "D:\\Sublime Text 3\\channel_v3.json"
    ]
}

This path is the location of the file we just downloaded. Pay attention to the code format!

  1. Restart Sublime

Six, Package Control cannot find a plug-in

If there is a plug-in that cannot be searched, you can go to https://packagecontrol.io/browse to search; after
searching and downloading the corresponding plug-in, go to Sublime to Preferences > Browse Packagesunzip the corresponding compressed package of the plug-in;
then restart Sublime.
Note: This method can also solve the failure of Package Control to download the plug-in.

Guess you like

Origin blog.csdn.net/qq_40662765/article/details/105407069