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


 

因為用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 每次打開更新的提示

preferences->seting user -》

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

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM