Sublime calling the shell

Source: Internet
Author: User
Tags sublime editor

When you do Flask Web development under Linux, you begin to fully learn to use the sublime editor.

Because of the need to shell execute the command under python run.py runserver , it is necessary to be able to invoke the shell execution of the instruction in sublime.

sublimereplthe problem was eventually resolved by installing the plug-in.

First, install the SUBLIMEREPL
    1. Call Ctrl+shift+p, enter: SUBLIMEREPL select and install; (if this sublimerepl is not found, then enter the install package to bring it back)
    2. Then Tools–sublimerepl–python you will find a Python shell window open, obviously this is not what we want;
    3. Go ahead and select the py file that we want to execute, choose the run current file, tools---SUBLIMEREPL, Python, which already supports entering data.
Second, set the shortcut key

Finally, as each run of the program executes: the run current File menu, Tools-Sublimerepl, Python, is a bit cumbersome, so you can now consider creating a shortcut key for him. Here's how:

Select Perferences–key bindings User on the main menu to paste the following code:

The following configuration sets F5 to run Python files, F6 to display the Python console, F7 to display the shell console, and then add "Preference-key-binding-user" directly.

[ {"Keys ":["F5"], "Caption ":"Sublimerepl:python-run Current File", "Command ":"Run_existing_window_command", "Args ":{ "ID ":"Repl_python_run", "File ":"Config/python/main.sublime-menu"}},{"Keys ":["F6"], "Caption ":"Sublimerepl:python", "Command ":"Run_existing_window_command", "Args ":{ "ID ":"Repl_python", "file": "Config/python/main.sublime-menu"}},{"Keys":["F7"], "caption": "Sublimerepl:shell", "Command": "Run_existing_window_command", "args": {"id": " Repl_shell ","file ": " Config/shell/main.sublime-menu "}}]       

Sublime calling the shell

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.