Home  >  Article  >  Development Tools  >  How to configure SublimeREPL shortcut keys in Sublime Text3 (Python)

How to configure SublimeREPL shortcut keys in Sublime Text3 (Python)

藏色散人
藏色散人forward
2019-12-28 11:55:156548browse

sublimeHow to use? How to configure SublimeREPL shortcut keys in Sublime Text3? Below I will introduce to you how to modify it. I hope it will be helpful to friends who need it!

How to configure SublimeREPL shortcut keys in Sublime Text3 (Python)

Because sublime is used to run python, if there is an input() function, ctrl b cannot input data, so I downloaded and installed sublimeREPL for debugging.

But sublimeREPL does not have custom shortcut keys, so you can only set them yourself.

There are many methods on the Internet but none of them are effective. I finally found the right way after struggling for a whole night.

First find the configuration file of sublimerepl.

Steps: Preferences-->Browse Packages-->SublimeREPL folder-->config folder-->Python folder-->Default.sublime-commands(open in text format )                                      

[
    {
        "caption": "SublimeREPL: Python",
        "command": "run_existing_window_command", "args":
        {
            "id": "repl_python",
            "file": "config/Python/Main.sublime-menu"
        }
    },
    {
        "caption": "SublimeREPL: Python - PDB current file",
        "command": "run_existing_window_command", "args":
        {
            "id": "repl_python_pdb",
            "file": "config/Python/Main.sublime-menu"
        }
    },
    {
        "caption": "SublimeREPL: Python - 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": "config/Python/Main.sublime-menu"
        }
    }
]

This is the repl configuration file, find the command you need and copy it.

Paste it into Preferences-->Key Bindings User

The code is as follows

[
    {
            "keys": ["f5"],//这是自己设的快捷键
       “” 
            "command": "run_existing_window_command", 
            "args":
            {
                "id": "repl_python_run",
                "file": "config/Python/Main.sublime-menu"
            }
    }
]

Just save it at the end.

Picture

How to configure SublimeREPL shortcut keys in Sublime Text3 (Python)

Tips on updating every time you open sublime

preferences->seting user -》
{
"font_size": 13,
"update_check":false,
}

For more sublime related technical articles, please visit sublimeColumn.

The above is the detailed content of How to configure SublimeREPL shortcut keys in Sublime Text3 (Python). For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete