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

直入正题:

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

“Preference...浏览插件...SublimeREPL文件夹...Configure文件夹...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"
        }
    }
]

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

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


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

[
    {"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个字符串换行,它又连回车换行符都吞了。。。。。。







评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值