SublimeREPL快捷键设置

SublimeREPL 允许你在 Sublime Text 中运行各种语言(NodeJS , Python,Ruby, Scala 和 Haskell 等等)。所以对于程序员来说,这是很重要的一个插件。下面以python为例,来说明这个快捷键设置

  • 1、

    点击“preference” - “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"
        }
    }
    ]  
  • 2、

    点击“preference” - “Key Bingings-User”输入如下内容

     {
        "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"代表SublimeREPL菜单列表中的Python-RUN current file
    "f4"代表SublimeREPL菜单列表中的Python

  • 3、点击“preference” - “Settings-User”输入如下内容

    "default_extend_env":
    {
    "PATH": "{PATH};C:\\Python27"
    },
  • 设置到此也就完成了

上一篇:Allegro 快捷键设置


下一篇:Sublime Text3安装SublimeREPL插件以及快捷键设置