The original article is reprinted from liu Yue’s Technology blog v3u.cn/a_id_131

During the epidemic, I have been using virtual machine under MAC to run Win10 system for online teaching recently. Due to the large number of online students, the memory increased when VScode was used for live teaching, so I considered switching back to Sublime3. After all, the editor is much lighter than IDE, and I will record the whole process here.

First download, sublime3 software installation package: www.sublimetext.com/

After installing python3.7, install python3.7 at www.python.org/. If you have not installed python3.7 before, do not forget to configure environment variables in Win10

With the editor and Python all installed, it’s time to configure the Python development environment within Sublime

1: Configures the compilation environment

Open sublime and click on Tools >Build System >New Build System

Paste the following code into the configuration file:

{

  "cmd": ["c:/python37/python.exe"."-u"."$file"]."file_regex":"^[ ]*File "(... *?)", line ([0-9]*)"."selector":"source.python",}Copy the code

When you’re done, click file — save in the upper left corner, name it python3, and save directly using the default path

Once saved, restart the editor, create a new test.py, enter the code, and run (CTRL + B) to see if the program succeeds. Save the file and test it

Sublime installs package Control to manage and install plug-ins

Use Ctrl+ ‘shortcut keys or the View->Show Console menu to open the command line and paste the following code

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())
Copy the code

When package Setting and Package Control are displayed in Perferences->, the installation is successful

Press Ctrl+Shift+P to bring up the plug-in command panel, type Install, select Install Package and press Enter

It is recommended to install the following plug-ins, which can make the development efficiency twice the result with half the effort

Anaconda
JavaScript Completions
SublimeLinter
SublimeLinter-pylint
AutoFileName
Python 3
SideBarEnhancements
Vue Syntax Highlight
Vuejs Complete Package
Vuejs Snippets
Copy the code

After installing these plug-ins, modify the Settings configuration file to configure them

{
	"font_size": 10,
        "index_files":false."ignored_packages":
	[
		"Vintage"]."save_on_focus_lost": true."theme": "Adaptive.sublime-theme"."update_check": false."word_wrap": true
}
Copy the code

Also don’t forget to turn off anaconda’s code check Settings in Settings:

Subsublime > Preferences > Package Settings > Anaconda > Settings User set off: {” anaconda_linting “: false}

In addition, because Python’s syntax-checking tool PyLint was too sensitive, the configuration file of SublimeLinter needed to be set:

// SublimeLinter Settings - User
{
    "linters": {
        "pylint": {

            // C0111 Missing docstring 
            // I0011 Warning locally suppressed using disable-msg
            // I0012 Warning locally suppressed using disable-msg
            // W0704 Except doesn't do anything Used when an except clause does nothing but "pass" and there is no "else" clause // W0142 Used * or * magic* Used when a function or method is called using *args or **kwargs to dispatch arguments. // W0212 Access to a protected member %s of a client class // W0232 Class has no __init__ method Used when a class has no __init__ method, neither its parent classes. // W0613 Unused argument %r Used when a function or method argument is not used. // W0702 No  exception's type specified Used when an except clause doesn't specify exceptions type to catch. // R0201 Method could be a function // W0614 Unused import XYZ from wildcard import  // R0914 Too many local variables // R0912 Too many branches // R0915 Too many statements // R0913 Too many arguments // R0904 Too many public methods "args": ["--disable=C0111,I0011,I0012,W0704,W0142,W0212,W0232,W0613,W0702,R0201,W0614,R0914,R0912,R0915,R0913,R0904,R0801,C0411, W0611,C0412,C0326,C0103,R1705,C0305,C0413,C0301,C0330,W0123,E1101,R0903,C0304,C0303,W0622,C0121,,W0703,W0107,W0312"], }}}Copy the code

One final question about the latest registration codes for Sublime Text 3

First find the host file, win10 in: C: / Windows/System32 / drivers/etc under the path, don’t forget to set the file permissions and otherwise can’t save

Add the following code to the end:

0.0.0.0 license.sublimehq.com
0.0.0.0 45.55.255.55
0.0.0.0 45.55.41.223
127.0.0.1 www.sublimetext.com
127.0.0.1 sublimetext.com
127.0.0.1 sublimehq.com
127.0.0.1 telemetry.sublimehq.com
Copy the code

Then open Sublime Text and select Help –> Enter License to copy the following code content into the input box

- BEGIN LICENSE -- ZYNGA INC. 50 User LICENSE EA7E-811825 927BA117 84C9300F 4A0CCBC4 34A56B44 985E4562 59F2B63B CCCFF92F  0E646B83 0FD6487D 1507AE29 9CC4F9F5 0A6F32E3 0343D868 C18E2CD5 27641A71 25475648 309705B3 E468DDC4 1B766A18 7952D28C E627DDBA 960A2153 69A2D98A C87C0607 45DC6049 8C04EC29 D18DFA40 442C680B 1342224D 44D90641 33A3B9F2 46AADB8F -- END LICENSE --Copy the code

Lime3 python and vue development feels relatively hardcore, but it’s still no match for vim. The difference with vscode is that the system usage is much lower, as shown below:

The original article is reprinted from liu Yue’s Technology blog v3u.cn/a_id_131