Win10+sublime3 configures python3.7 and vue2.0 front-end and back-end separation projects (all kinds of plug-ins step on pits)

Win10+sublime3 configures python3.7 and vue2.0 front-end and back-end separation projects (all kinds of plug-ins step on pits)

The original text is reproduced from "Liu Yue's Technology Blog" v3u.cn/a_id_131

At the moment of the epidemic, I have been using the virtual machine under the mac to run the win10 system for online teaching. Due to the large number of online people, the memory skyrocketed when using vscode during live teaching, so I considered switching back to sublime3. After all, the editor is lighter than ide. The amount is large, here is the record of the entire process.

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

After installation, install python3.7, download address: www.python.org/ , since I have installed it before, I won t go into details, students who have not installed it, don t forget to configure environment variables under win10 after installation.

After the editor and Python are installed, the python development environment is configured in sublime

1: Configure the compilation environment

Open sublime, click on the menu 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",

}
 

After completion, click file - save in the upper left corner to save, name it python3, and use the default path to save directly

After saving, restart the editor, then create a new test.py, enter the code, run (ctrl+b) to test whether the program is successful, remember to save the file and test

Not finished yet, sublime installs package control to manage and install plugins

Use the Ctrl+` shortcut key or open the command line through the View->Show Console menu, 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())
 

After the installation is successful: see package setting and package control in Perferences->, it means the installation is successful

At this time, press Ctrl+Shift+P to call up the plug-in command panel, enter install and select install package and press Enter

It is recommended to install the following plug-ins, which can make the development efficiency more effective

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

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

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

Also don't forget to turn off the code inspection setting of anaconda in the settings:

Sublime> Preferences> Package Settings> Anaconda> Settings User settings are closed:
{"anaconda_linting": false}

In addition, because python's syntax checking tool pylint is too sensitive, it is necessary to set the configuration file of SublimeLinter:

//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"],
        }
    }
}


 

Last question about the latest registration code of Sublime Text 3

First find the host file, win10 is under the path C:/Windows/System32/drivers/etc, don t forget to set the file permissions before modifying, otherwise it won t be saved

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
 

Then open sublime text, select help-->enter license, and 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  
 

In this way, it can be cracked permanently. Using sublime3 to develop python and vue feels relatively hard-core, but it is still incomparable with those who use vim. The difference with vscode is that the system occupies a lot less, as shown in the figure below:

The original text is reproduced from "Liu Yue's Technology Blog" v3u.cn/a_id_131