Sublime Text3配置SublimeREPL快捷鍵的方法(Python)

 

由於用sublime運行python,若是有input()函數,ctrl+b是不能輸入數據的,因此下載安裝了sublimeREPL進行調試。python

可是sublimeREPL沒有自定義快捷鍵,因此只有本身設置。函數

網上不少方法可是都沒有效果,最後折騰了一夜終於找到正確方式。spa

首先找到sublimerepl的配置文件。調試

步驟:Preferences-->Browse Packages-->SublimeREPL文件夾-->config文件夾-->Python文件夾-->Default.sublime-commands(以文本格式打開)                                  code

[
    {
        "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的配置文件,找到你須要的命令複製下來。blog

粘貼到Preferences-->Key Bindings Userip

代碼以下input

[
    {
            "keys": ["f5"],//這是本身設的快捷鍵
       「」 
"command": "run_existing_window_command", "args": { "id": "repl_python_run", "file": "config/Python/Main.sublime-menu" } } ]

最後保存就好了。io

如圖class

 關於sublime 每次打開更新的提示

preferences->seting user -》

{
"font_size": 13,
"update_check":false,
}

 

 

看完掃紅包,月入百萬

相關文章
相關標籤/搜索