1. 安装Package Control
到 https://packagecontrol.io/installation, 找到sublime text 对应版本的安装脚本,将它复制下来。
2. 打开sublime text控制台
通过快捷键 ctrl + ` 或者 通过 View > Show Console 打开,然后粘贴复制的安装脚本,按回车键。
3. 安装SublimeREPL
3.1 通过菜单 Preferences | Package Control | Package Control: Install Package
3.2 选择 SublimeREPL
3.3 重启sublime text.
4. 配置repl.
4.1 通过菜单Preferences | Browse Packages… 打开packages安装目录。
4.2 找到SublimeREPL > config > Scheme
4.3.打开 Default.sublime-commands, 增加如下节点,
{
"caption": "SublimeREPL: Chicken Scheme",
"command": "run_existing_window_command", "args":
{
"id": "repl_chicken_scheme",
"file": "config/Scheme/Main.sublime-menu"
}
},
并保存。
4.4 打开 Main.sublime-menu, 增加如下节点,
{"command": "repl_open",
"caption": "Chicken Scheme",
"id": "repl_chicken_scheme",
"mnemonic": "C",
"args": {
"type": "subprocess",
"encoding": "utf8",
"external_id": "chicken_scheme",
"cmd": {"linux": ["csi","-:c"],
"osx": ["csi", "-:c"],
"windows": ["csi", "-:c"]},
"soft_quit": "\nexit\n",
"cwd": "$folder",
"cmd_postfix": "\n",
"extend_env": {"INSIDE_EMACS": "1"},
"syntax": "Packages/sublime-scheme-syntax/Scheme.tmLanguage"
}
},
并保存。
5. 重启sublime text 3.
这样就配置好了chicken scheme 在sublime text中的REPL环境。