Sublime 3 Use of Python-based environments

Source: Internet
Author: User
Tags sublime text

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:
      1. 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)
      2. Paste the following code into the bottom command line and enter:
importurllib.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())
    1. Restart Sublime Text 3.
    2. If you see the package control item in Perferences->package settings, the installation succeeds.
To install a plugin using the package control method:
    1. Press Ctrl+shift+p to bring up the command panel
    2. 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.