1, ctrl+shift+r automatic adjustment format
Open Sublime Text
Create a new Python build system
{"cmd": ["C:\\python\\python.exe", "-U", "$file"], "File_regex": "^[]*file \" (... *) \ ", line ([0-9]*)", "selector": "Source.python", "Encoding": "cp936"}
Replace the path C:\\python\\python.exe with the Python path on your computer. Save in User folder with Sublime-build suffix
5, install SUBLIMEREPL plug-in
First make sure you have the package contro installed
You can also install the package control component and install it directly online:
- Press CTRL + ' bring up the console (note: There is a conflict between the keyboard shortcuts installed QQ Input method, Input Method property settings-Input Method management-Cancel Hotkey switch to QQ pinyin)
- Paste the following code into the bottom command line and enter:
|
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())
|
- Restart Sublime Text 3.
- If you see the package control item in Perferences->package settings, the installation succeeds.
To install a plugin using the package control method:
- Press Ctrl+shift+p to bring up the command panel
- Enter install to bring up the Install Package option and enter, then select the plug-in you want to install in the list.
The uncomfortable is that some network environment may not allow access to unfamiliar network environment to set up a firewall.
Install Sublimerepl.
Set the more common
The shortcut keys for these two functions
The code is as follows
[{"Keys": ["F5"], "caption": "Sublimerepl:python-run Current File", "command": "Run_existing_window_command "," args ": { " id ":" Repl_python_run ", " file ":" Config/python/main.sublime-menu " }}]
Sublime 3 Use of Python-based environments