As we all know, ST3 (Sublime Text 3) comes with a build python that can run the. py file directly, but it cannot be used if the input () function is involved.
Here are some of my personal things for me to be enough of the configuration, because I am still in the beginning of the Python stage, so the relevant configuration is relatively basic and simple.
First step: Download Sublime Text
Download please go to the official website to download, depending on your own operating system, because my my system is windows, the following is the example of Windows to expand the introduction.
Step two: Install Sublime Text under Windows
1.64-bit system, corresponding to x64,32-bit system corresponding to X86.
2. When installing, be careful to select
Add to Explorer context menuSo that sublime text can be added to the right button, and when you right-click the file, you can open it directly using sublime text. Step three: Install the plug-in and plug-in configuration 1, package Control1.1, install Control1. Sublime text can use the package Control to make it easier to browse, install, and uninstall plugins. 2. How do I install the package control? (1) Detailed installation details please see "https://www.jeffdesign.net/blog/62/", here no longer repeat. (2) If you see the package control item in Perferences->package settings, the installation is successful.
1.2. Use the package control to view installed plugins
1. Press Ctrl+shift+p to bring up the command panel.
2. Enter install to bring up the Install Package option and enter.
3. Select the plugin to install in the list, or enter the plug-in name (for example, to install the Imesupport plugin, enter Imesupport, it will filter the results in real time), according to the filter results in the command panel, choose the plug-in to install.
1.3. Package control to install the plug -in Path
If you want to see what plug-ins are already installed in Sublime Text 3, you can do so in the following ways.
1. Press Ctrl+shift+p to bring up the command panel
2. Enter "Package" in the drop-down list to find "package control:list packages", select and enter, all the plug-ins will be displayed.
2, Sublimerepl
SUBLIMEREPL: This is the big head of this article, the main object to be introduced, used to run Python files.
2.1. Installation
When you click the Preferences. Package Control on the toolbar, a series of pre-selection items will appear, select the package Control:install package, and an entry box will appear in a moment. Enter the name of the plug-in you want to install, such as Sublimerepl here, later plugins are installed in this way. After entering Sublimerepl, the first one in the general preselection is what we want. During the installation, there will be a small thing running around the bottom bar, which will stop after the installation is complete.
2.2. Shortcut key Configuration
After the plug-in installation is complete, to find a demo file test, the steps to run the Python file are: Tools, Sublimerepl->python, python-run current file.
If every time you run Python code from tools into the point will be very troublesome, this need to set shortcut keys, in order to set this, look over the network, most of the scheme is wrong, there will be problems, finally found a correct method, for details please refer to "http://blog.csdn.net/ write_down/article/details/52993497 "
Here are the steps: Find the SUBLIMEREPL configuration file, Preferences-->browse Packages-->sublimerepl folder-->config folder-->python folder-- >default.sublime-commands (opens in text format, as opened with notpad++ editor)
[{"caption": "Sublimerepl:python", "command": "Run_existing_window_command", "args": { "id": "Repl_python", "File": "Config/python/main.sublime-menu"}}, {"caption": "Sublim erepl:python-pdb current File "," command ":" Run_existing_window_command "," args ": {" id ":" Rep L_python_pdb "," File ":" Config/python/main.sublime-menu "}}, {" caption ":" Sublimerepl:py Thon-run current File "," command ":" Run_existing_window_command "," args ": {" id ":" Repl_python_ Run "," File ":" Config/python/main.sublime-menu "}}, {" command ":" Python_virtualenv_repl ", "caption": "Sublimerepl:python-virtualenv"}, {"caption": "Sublimerepl:python-ipython", "Command": "Run_existing_window_command", "args": {"id": "Repl_python_ipython", "File": "Co Nfig/python/main.sublime-menu "}}]
Here we need to use Repl_python_run, if you need other commands can also choose other code, find the command you need to copy down.
Paste to Preferences-->key bindings-->key Bindings User
The code is as follows:
[ {"Keys": ["Ctrl+alt+p"], "command": "Run_existing_window_command", "args": { "id": "Repl_python_run", "file": "Config/python/main.sublime-menu" } ]
The keys are followed by shortcuts, you can write what you want, and finally save it.
There are many plug-ins useful for Python development, this article does not say much, please refer to "http://www.cnblogs.com/jxldjsn/p/6034158.html" for details
Sublime Text 3 Some personal settings for configuring the Python development environment