天天看点

配置sublime REPL调试R终端

一、使用sublime自带install package 安装sublimeRepl and SendCode包。

    在sublime打开Preferences->Package Control,输入install package回车,就直接进入安装包的环境,接下来就安装sublimeRepl

    and SendCode包。

二、配置sublime使其能够支持R终端调试。

1、添加Sendcode-setting:

      {

        "prog": "sublimerepl",

        "r":

        {

             "bracketed_paste_mode": false,

            "prog": "sublimerepl"

         }

       }

  2、配置Key-Binding:

  { "keys": ["f5"],

    "caption": "SublimeREPL: Rssh166",

    "command":"repl_open","args":

    {

        "type": "subprocess",

        "external_id": "r",

        "additional_scopes": ["tex.latex.knitr"],

        "encoding":

        {

            "windows": "$win_cmd_encoding",

            "linux": "utf8",

            "osx": "utf8"

        },

        "soft_quit": "\nquit(save=\"no\")\n",

        "cmd": {"linux":

                    [

                        "ssh",

                        "[email protected]", "-p22",

                        "R","--interactive", "--no-readline"

                    ]

                },

        "cwd": "$file_path",

        "extend_env":

        {

            "osx": {"PATH": "{PATH}:/usr/local/bin"},

            "linux": {"PATH": "{PATH}:/usr/local/bin"},

            "windows": {}

        },

        "cmd_postfix": "\n",

        "suppress_echo":

        {

            "osx": true,

            "linux": true,

            "windows": false

        },

        "syntax": "Packages/R/R Console.tmLanguage"

    }

  },

三、配置完重启终端,直接就可以将R 代码发送过去调试。

配置sublime REPL调试R终端