Skip to content

Instantly share code, notes, and snippets.

@dmoulton
Created January 27, 2012 04:00
Show Gist options
  • Save dmoulton/1686908 to your computer and use it in GitHub Desktop.
Save dmoulton/1686908 to your computer and use it in GitHub Desktop.
Non interactive ruby REPL for Sublime Text 2
1. Install Sublime REPL: https://github.com/wuub/SublimeREPL
2. Create a file "~/Library/Application Support/Sublime Text 2/Packages/SublimeREPL/config/Ruby Non Interactive/Main.sublime-menu" with the text below.
3. Please comment if you can get a shortcut to work for this. I haven't been able to yet.
[
{
"id": "tools",
"children":
[{
"caption": "SublimeREPL",
"mnemonic": "r",
"id": "SublimeREPL",
"children":
[
{"command": "repl_open",
"caption": "Ruby NI",
"mnemonic": "r",
"args": {
"type": "subprocess",
"external_id": "ruby_ni",
"encoding": "utf8",
"cmd": {"windows": ["ruby", "$file"],
"linux": ["ruby", "$file"],
"osx": ["ruby", "$file"]},
"cwd": "$file_path",
"cmd_postfix": "\n", // postfix
"suppress_echo": true,
"syntax": "Packages/Ruby/Ruby.tmLanguage"
}
}
]
}]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment