温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Sublime Text3如何配置SublimeREPL快捷键

发布时间:2021-01-16 10:11:56 来源:亿速云 阅读:407 作者:小新 栏目:软件技术

小编给大家分享一下Sublime Text3如何配置SublimeREPL快捷键,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!

因为用sublime运行python,如果有input()函数,ctrl+b是不能输入数据的,所以下载安装了sublimeREPL进行调试。

但是sublimeREPL没有自定义快捷键,所以只有自己设置。

网上很多方法但是都没有效果,最后折腾了一晚上终于找到正确方式。

首先找到sublimerepl的配置文件。

步骤:Preferences-->Browse Packages-->SublimeREPL文件夹-->config文件夹-->Python文件夹-->Default.sublime-commands(以文本格式打开)

[
    {
        "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"
        }
    }
]

这是repl的配置文件,找到你需要的命令复制下来。

粘贴到Preferences-->Key Bindings User

代码如下

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

最后保存就行了。

如图

Sublime Text3如何配置SublimeREPL快捷键

关于sublime 每次打开更新的提示

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

看完了这篇文章,相信你对“Sublime Text3如何配置SublimeREPL快捷键”有了一定的了解,如果想了解更多相关知识,欢迎关注亿速云行业资讯频道,感谢各位的阅读!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI