前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Sublime Text 中的SublimeREPL的绑定快捷键配置

Sublime Text 中的SublimeREPL的绑定快捷键配置

作者头像
望天
发布2018-08-02 11:41:05
1.1K0
发布2018-08-02 11:41:05
举报
文章被收录于专栏:along的开发之旅along的开发之旅

直入正题:

因为在配置python的Sublime Text环境,所以以python为例说明。

“Preference...浏览插件...SublimeREPL文件夹...Configure文件夹...Python文件夹...Default.sublime-commands”文件。

右键编辑此文件,内容如下

代码语言:javascript
复制
[
    {
        "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"
        }
    }
]

这就分别对应着“工具...SublimeREPL...Python”下的几个命令。

接下来是Sublime Text的按键绑定用法,详情见按键绑定:“http://sublime-undocs-zh.readthedocs.org/en/latest/reference/key_bindings.html”

“Preference...按键绑定-用户”,全文内容如下:

代码语言:javascript
复制
[
    {"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":["f4"],
     "caption": "SublimeREPL: Python - IPython",
     "command": "run_existing_window_command", "args":
     {
         "id": "repl_python_ipython",
         "file": "config/Python/Main.sublime-menu"
     }}
]

分别代表用 F5绑定repl_python_run,即运行当前文件。F6绑定IPython模式,就是command line模式。

但是自动换行似乎不太好用,dir(help),输出不换行的一行。。。点击80个字符串换行,它又连回车换行符都吞了。。。。。。

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2014年05月01日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档