mirror of
https://github.com/sstent/sublime-text-3.git
synced 2026-06-06 02:44:14 +00:00
backing up sublime settings
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Clisp",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_clisp",
|
||||
"file": "config/Clisp/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"id": "repl_clisp",
|
||||
"caption": "Clisp",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": ["clisp", "-disable-readline"],
|
||||
"cwd": "$file_path",
|
||||
"syntax": "Packages/Lisp/Lisp.tmLanguage",
|
||||
"external_id": "lisp"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,18 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Clojure",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_clojure",
|
||||
"file": "config/Clojure/Main.sublime-menu"
|
||||
}
|
||||
},
|
||||
{
|
||||
"caption": "SublimeREPL: Clojure-Telnet",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_clojure_telnet",
|
||||
"file": "config/Clojure/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,4 @@
|
||||
[
|
||||
{ "keys": ["ctrl+f12", "c", "s"], "command": "run_existing_window_command", "args": {"id": "repl_clojure", "file": "config/Clojure/Main.sublime-menu"}},
|
||||
{ "keys": ["ctrl+f12", "c", "t"], "command": "run_existing_window_command", "args": {"id": "repl_clojure_telnet", "file": "config/Clojure/Main.sublime-menu"}}
|
||||
]
|
||||
@@ -0,0 +1,38 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"caption": "Clojure",
|
||||
"id": "Clojure",
|
||||
"children":[
|
||||
{"command": "repl_open",
|
||||
"caption": "Clojure",
|
||||
"id": "repl_clojure",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": {"windows": ["lein.bat", "repl"],
|
||||
"linux": ["lein", "repl"],
|
||||
"osx": ["lein", "repl"]},
|
||||
"soft_quit": "\n(. System exit 0)\n",
|
||||
"cwd": {"windows":"c:/Clojure",
|
||||
"linux": "$file_path",
|
||||
"osx": "$file_path"},
|
||||
"syntax": "Packages/Clojure/Clojure.tmLanguage",
|
||||
"external_id": "clojure",
|
||||
"extend_env": {"INSIDE_EMACS": "1"}
|
||||
}
|
||||
},
|
||||
{"command": "clojure_auto_telnet_repl",
|
||||
"id": "repl_clojure_telnet",
|
||||
"caption": "Clojure-Telnet"}]}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,18 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: ClojureScript Browser REPL",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_clojurescript_browser",
|
||||
"file": "config/ClojureScript/Main.sublime-menu"
|
||||
}
|
||||
},
|
||||
{
|
||||
"caption": "SublimeREPL: ClojureScript",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_clojurescript",
|
||||
"file": "config/ClojureScript/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,54 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"caption": "ClojureScript",
|
||||
"id": "ClojureScript",
|
||||
"children":[
|
||||
{"command": "repl_open",
|
||||
"caption": "ClojureScript Browser REPL",
|
||||
"id": "repl_clojurescript_browser",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": {"windows": ["lein.bat", "trampoline", "cljsbuild", "repl-listen"],
|
||||
"linux": ["lein", "trampoline", "cljsbuild", "repl-listen"],
|
||||
"osx": ["lein", "trampoline", "cljsbuild", "repl-listen"]},
|
||||
"soft_quit": "\n(. System exit 0)\n",
|
||||
"cwd": {"windows":"c:/Clojure",
|
||||
"linux": "$file_path",
|
||||
"osx": "$file_path"},
|
||||
"syntax": "Packages/Clojure/Clojure.tmLanguage",
|
||||
"external_id": "clojurescript",
|
||||
"extend_env": {"INSIDE_EMACS": "1"}
|
||||
}
|
||||
},
|
||||
{"command": "repl_open",
|
||||
"caption": "ClojureScript",
|
||||
"id": "repl_clojurescript",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": {"windows": ["lein.bat", "trampoline", "cljsbuild", "repl-rhino"],
|
||||
"linux": ["lein", "trampoline", "cljsbuild", "repl-rhino"],
|
||||
"osx": ["lein", "trampoline", "cljsbuild", "repl-rhino"]},
|
||||
"soft_quit": "\n(. System exit 0)\n",
|
||||
"cwd": {"windows":"c:/Clojure",
|
||||
"linux": "$file_path",
|
||||
"osx": "$file_path"},
|
||||
"syntax": "Packages/Clojure/Clojure.tmLanguage",
|
||||
"external_id": "clojurescript",
|
||||
"extend_env": {"INSIDE_EMACS": "1"}
|
||||
}
|
||||
}
|
||||
]}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>comment</key>
|
||||
<string>ClojureScript</string>
|
||||
<key>name</key>
|
||||
<string>ClojureScript</string>
|
||||
<key>fileTypes</key>
|
||||
<array>
|
||||
<string>cljs</string>
|
||||
</array>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>source.clojure</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scopeName</key>
|
||||
<string>source.clojurescript</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: CoffeeScript",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_coffeescript",
|
||||
"file": "config/CoffeeScript/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,28 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"id": "repl_coffeescript",
|
||||
"caption": "CoffeeScript",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": ["coffee", "-i"],
|
||||
"cwd": "$file_path",
|
||||
"syntax": "Packages/CoffeeScript/CoffeeScript.tmLanguage",
|
||||
"external_id": "coffeescript",
|
||||
"additional_scopes": ["coffee"],
|
||||
"extend_env": {"NODE_DISABLE_COLORS": "1"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Elixir",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_elixir",
|
||||
"file": "config/Elixir/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,27 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"id": "repl_elixir",
|
||||
"caption": "Elixir",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": ["iex"],
|
||||
"cwd": "$file_path",
|
||||
"syntax": "Packages/Elixir/Elixir.tmLanguage",
|
||||
"external_id": "elixir",
|
||||
"extend_env": {"NODE_DISABLE_COLORS": "1"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Erlang",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_erlang",
|
||||
"file": "config/Erlang/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,27 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"id": "repl_erlang",
|
||||
"caption": "Erlang",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": ["erl", "-i"],
|
||||
"cwd": "$file_path",
|
||||
"syntax": "Packages/Erlang/Erlang.tmLanguage",
|
||||
"external_id": "erlang",
|
||||
"extend_env": {"NODE_DISABLE_COLORS": "1"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Python - execnet",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_sublime_execnet",
|
||||
"file": "config/Execnet/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,21 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children": [
|
||||
{"caption": "Python",
|
||||
"id": "Python",
|
||||
"children": [
|
||||
{
|
||||
"command": "execnet_virtualenv_repl",
|
||||
"id": "repl_sublime_execnet",
|
||||
"caption": "Python - execnet"
|
||||
}
|
||||
]}
|
||||
]}
|
||||
]
|
||||
}]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: F#",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_f#",
|
||||
"file": "config/F/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,31 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "F#",
|
||||
"id": "repl_f#",
|
||||
"mnemonic": "f",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"external_id": "fsharp",
|
||||
"encoding": "utf8",
|
||||
"cmd": {
|
||||
"windows": ["fsi.exe", "--utf8output", "--gui-"],
|
||||
"osx": ["fsharpi", "--utf8output", "--readline-"],
|
||||
"linux": ["fsi", "--utf8output", "--readline-"]},
|
||||
"cmd_postfix": ";;\n",
|
||||
"cwd": "$file_path",
|
||||
"syntax": "Packages/F#/F#.tmLanguage"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: GDB",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_gdb",
|
||||
"file": "config/GDB/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "GDB",
|
||||
"id": "repl_gdb",
|
||||
"mnemonic": "d",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": ["gdb"],
|
||||
"cwd": "$file_path",
|
||||
"external_id": "gdb"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Groovy",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_groovy",
|
||||
"file": "config/Groovy/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,35 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"id": "repl_groovy",
|
||||
"caption": "Groovy",
|
||||
"mnemonic": "g",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"external_id": "groovy",
|
||||
"cmd": {"linux": ["groovysh", "--terminal=none"],
|
||||
"osx": ["groovysh", "--terminal=none"],
|
||||
"windows": ["groovysh.bat", "--terminal=none"]},
|
||||
"soft_quit": "\nexit\n",
|
||||
"cwd": "$file_path",
|
||||
"cmd_postfix": "\n",
|
||||
"extend_env": {"osx": {"PATH": "{PATH}:/usr/local/bin"},
|
||||
"linux": {"PATH": "{PATH}:/usr/local/bin"},
|
||||
"windows": {}},
|
||||
"suppress_echo": false,
|
||||
"syntax": "Packages/Groovy/Groovy.tmLanguage"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Haskell",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_haskell",
|
||||
"file": "config/Haskell/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,27 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "Haskell",
|
||||
"id": "repl_haskell",
|
||||
"mnemonic": "h",
|
||||
"args": {
|
||||
"type": "sublime_haskell",
|
||||
"encoding": "utf8",
|
||||
"cmd": ["ghci"],
|
||||
"cwd": "$file_path",
|
||||
"external_id": "haskell",
|
||||
"syntax": "Packages/Haskell/Haskell.tmLanguage"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Io",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_io",
|
||||
"file": "config/Io/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,255 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~I</string>
|
||||
<key>name</key>
|
||||
<string>Io Repl</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.empty-parenthesis.io</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>comment</key>
|
||||
<string>we match this to overload return inside () --Allan; scoping rules for what gets the scope have changed, so we now group the ) instead of the ( -- Rob</string>
|
||||
<key>match</key>
|
||||
<string>\((\))</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.comma-parenthesis.io</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>comment</key>
|
||||
<string>We want to do the same for ,) -- Seckar; same as above -- Rob</string>
|
||||
<key>match</key>
|
||||
<string>\,(\))</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(if|ifTrue|ifFalse|ifTrueIfFalse|for|loop|reverseForeach|foreach|map|continue|break|while|do|return)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.control.io</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>/\*</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.io</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>\*/</string>
|
||||
<key>name</key>
|
||||
<string>comment.block.io</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(^[ \t]+)?(?=//)</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.whitespace.comment.leading.io</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?!\G)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>//</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.io</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>\n</string>
|
||||
<key>name</key>
|
||||
<string>comment.line.double-slash.io</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(^[ \t]+)?(?=#)</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.whitespace.comment.leading.io</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?!\G)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>#</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.io</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>\n</string>
|
||||
<key>name</key>
|
||||
<string>comment.line.number-sign.io</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>comment</key>
|
||||
<string>I wonder if some of this isn't variable.other.language? --Allan; scoping this as variable.language to match Objective-C's handling of 'self', which is inconsistent with C++'s handling of 'this' but perhaps intentionally so -- Rob</string>
|
||||
<key>match</key>
|
||||
<string>\b(self|sender|target|proto|protos|parent)\b</string>
|
||||
<key>name</key>
|
||||
<string>variable.language.io</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string><=|>=|=|:=|\*|\||\|\||\+|-|/|&|&&|>|<|\?|@|@@|\b(and|or)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.io</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\bGL[\w_]+\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.other.io</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b([A-Z](\w+)?)\b</string>
|
||||
<key>name</key>
|
||||
<string>support.class.io</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(clone|call|init|method|list|vector|block|(\w+(?=\s*\()))\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.io</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(gl(u|ut)?[A-Z]\w+)\b</string>
|
||||
<key>name</key>
|
||||
<string>support.function.open-gl.io</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>"""</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.io</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>"""</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.io</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.triple.io</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\\.</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.io</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>"</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.io</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>"</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.io</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.double.io</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\\.</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.io</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.numeric.io</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(Lobby)\b</string>
|
||||
<key>name</key>
|
||||
<string>variable.other.global.io</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(TRUE|true|FALSE|false|NULL|null|Null|Nil|nil|YES|NO)\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.language.io</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scopeName</key>
|
||||
<string>source.io</string>
|
||||
<key>uuid</key>
|
||||
<string>52E416F3-9DF2-4579-8BC6-C54EBEF94423</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,32 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "Io",
|
||||
"id": "repl_io",
|
||||
"mnemonic": "i",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": {"linux": ["io", "${packages}/SublimeREPL/config/Io/repl.io"],
|
||||
"windows": ["io", "${packages}/SublimeREPL/config/Io/repl.io"],
|
||||
"osx": ["io", "${packages}/SublimeREPL/config/Io/repl.io"]},
|
||||
"cwd": "$file_path",
|
||||
"external_id": "io",
|
||||
"suppress_echo": {"linux": true,
|
||||
"windows": false,
|
||||
"osx": true},
|
||||
"syntax": "Packages/SublimeREPL/config/Io/Io.tmLanguage"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,147 @@
|
||||
# This code is modified Z_CLI.io from https://github.com/stevedekorte/io/blob/master/libs/iovm/io/Z_CLI.io
|
||||
Locals removeSlot("doFile")
|
||||
|
||||
DummyLine := File standardInput do(
|
||||
readLine := method(prompt,
|
||||
if(prompt, prompt print; File flush)
|
||||
resend
|
||||
)
|
||||
)
|
||||
|
||||
CLI := Object clone do(
|
||||
prompt ::= "Io> "
|
||||
outPrompt ::= "==> "
|
||||
continuedLinePrompt ::= "... "
|
||||
|
||||
isRunning ::= true # Get rid of this ...
|
||||
commandLineLabel ::= "Command Line" # and this?
|
||||
|
||||
context ::= lazySlot(
|
||||
Lobby do(
|
||||
# Python-style underscore, stores the result of the previous computation.
|
||||
# Example:
|
||||
# Io> 1 + 1
|
||||
# ==> 2
|
||||
# Io> _ == 2
|
||||
# ==> true
|
||||
_ ::= nil
|
||||
|
||||
exit := method(CLI stop)
|
||||
)
|
||||
)
|
||||
|
||||
lineReader := lazySlot(
|
||||
# This might look as a `hack`, but why not use stdin as the default
|
||||
# reader, since it shares the same interface with Read(Edit)Line,
|
||||
# i.e. <reader> readLine.
|
||||
reader := DummyLine
|
||||
|
||||
# Trying to use GNU ReadLine as the default line reader, falling
|
||||
# back to EditLine, if the attempt failed.
|
||||
try(reader := ReadLine) catch(Exception,
|
||||
try(reader := EditLine)
|
||||
)
|
||||
reader
|
||||
)
|
||||
|
||||
# A list of error messages for the errors we understand.
|
||||
knownErrors := lazySlot(
|
||||
list("(", "[", "{", "\"\"\"", "(x,") map(error,
|
||||
self errorMessage(try(error asMessage) error)
|
||||
)
|
||||
)
|
||||
|
||||
errorMessage := method(error, error beforeSeq(" on line"))
|
||||
|
||||
doFile := method(path,
|
||||
System launchPath = if(Path isPathAbsolute(path),
|
||||
path
|
||||
,
|
||||
System launchPath asMutable appendPathSeq(path)
|
||||
) pathComponent
|
||||
|
||||
System launchScript = path
|
||||
|
||||
context doFile(path)
|
||||
)
|
||||
|
||||
doLine := method(lineAsMessage,
|
||||
# Execute the line and report any exceptions which happened.
|
||||
executionError := try(result := context doMessage(lineAsMessage))
|
||||
if(executionError,
|
||||
executionError showStack
|
||||
,
|
||||
# Write out the command's result to stdout; nothing is written
|
||||
# if the CLI is terminated, this condition is satisfied, only
|
||||
# when CLI exit() was called.
|
||||
if(isRunning,
|
||||
context set_(getSlot("result"))
|
||||
writeCommandResult(getSlot("result")))
|
||||
)
|
||||
)
|
||||
|
||||
doIorc := method(
|
||||
# Note: Probably won't work on Windows, since it uses %HOMEPATH%
|
||||
# and %HOMEDRIVE% pair to indentify user's home directory.
|
||||
home := System getEnvironmentVariable("HOME")
|
||||
if(home,
|
||||
path := Path with(home, ".iorc")
|
||||
if(File with(path) exists,
|
||||
context doFile(path)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
writeWelcomeBanner := method("Io #{System version}" interpolate println)
|
||||
writeCommandResult := method(result,
|
||||
outPrompt print
|
||||
|
||||
if(exc := try(getSlot("result") asString println),
|
||||
"<exception while dislaying result>" println
|
||||
exc showStack
|
||||
)
|
||||
)
|
||||
|
||||
stop := method(setIsRunning(false))
|
||||
|
||||
interactive := method(
|
||||
# Start with the default prompt. The prompt is changed for continued lines,
|
||||
# and errors.
|
||||
prompt := self prompt
|
||||
line := ""
|
||||
# If there are unmatched (, {, [ or the command ends with a \ then we'll
|
||||
# need to read multiple lines.
|
||||
loop(
|
||||
# Write out prompt and read line.
|
||||
if(nextLine := lineReader readLine(prompt),
|
||||
# Add what we read to the line we've been building up
|
||||
line = line .. nextLine
|
||||
,
|
||||
# Note: readLine method returns nil if ^D was pressed.
|
||||
context exit
|
||||
"\n" print # Fixing the newline issue.
|
||||
)
|
||||
|
||||
compileError := try(
|
||||
lineAsMessage := line asMessage setLabel(commandLineLabel)
|
||||
)
|
||||
|
||||
if(compileError,
|
||||
# Not sure that, displaying a different notification for
|
||||
# each error actually makes sense.
|
||||
if(nextLine size > 0 and errorMessage(compileError error) in(knownErrors),
|
||||
prompt = continuedLinePrompt
|
||||
continue
|
||||
)
|
||||
# If the error can't be fixed by continuing the line - report it.
|
||||
compileError showStack
|
||||
,
|
||||
doLine(lineAsMessage)
|
||||
)
|
||||
|
||||
return if(isRunning, interactive, nil)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
CLI interactive
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Lua",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_lua",
|
||||
"file": "config/Lua/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,27 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "Lua",
|
||||
"id": "repl_lua",
|
||||
"mnemonic": "l",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": ["lua", "-i"],
|
||||
"cwd": "$file_path",
|
||||
"external_id": "lua",
|
||||
"syntax": "Packages/Lua/Lua.tmLanguage"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,29 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
// {"command": "repl_open",
|
||||
// "caption": "Command Caption in Menu",
|
||||
// "mnemonic": "m",
|
||||
// "args": {
|
||||
// "type": "subprocess|telnet",
|
||||
// "encoding": "utf8",
|
||||
// "cmd": ["bash", "-i"] or "bash -i" on windows,
|
||||
// "cwd": "$file_path",
|
||||
// "env": {}, // clean environment for subprocess repl
|
||||
// "extend_env": {}, // variables to be added to standard env
|
||||
// "cmd_postfix": "\n", // postfix that will be automatically added after a line in repl
|
||||
// "suppress_echo": false, // try to remove remote echo
|
||||
// "syntax": "Packages/Text/Plain text.tmLanguage"
|
||||
// }
|
||||
// },
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Matlab",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_matlab",
|
||||
"file": "config/Matlab/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,27 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "Matlab",
|
||||
"id": "repl_matlab",
|
||||
"mnemonic": "m",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": ["matlab", "-nodesktop","-nosplash"],
|
||||
"cwd": "$file_path",
|
||||
"external_id": "matlab",
|
||||
"syntax": "Packages/Matlab/Matlab.tmLanguage"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Maxima",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_maxima",
|
||||
"file": "config/Maxima/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "Maxima",
|
||||
"id": "repl_maxima",
|
||||
"mnemonic": "m",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": ["maxima"],
|
||||
"cwd": "$file_path",
|
||||
"external_id": "maxima"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: MozRepl",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_mozrepl",
|
||||
"file": "config/MozRepl/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "MozRepl",
|
||||
"mnemonic": "m",
|
||||
"id": "repl_mozrepl",
|
||||
"args": {
|
||||
"type": "telnet",
|
||||
"encoding": "utf8",
|
||||
"host":"localhost",
|
||||
"port": 4242,
|
||||
"syntax": "Packages/JavaScript/JavaScript.tmLanguage"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Node",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_node",
|
||||
"file": "config/NodeJS/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,31 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "Node",
|
||||
"id": "repl_node",
|
||||
"mnemonic": "n",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": {"linux": ["node", "${packages}/SublimeREPL/config/NodeJS/repl.js"],
|
||||
"osx": ["node", "${packages}/SublimeREPL/config/NodeJS/repl.js"],
|
||||
"windows": ["node.exe", "${packages}/SublimeREPL/config/NodeJS/repl.js"]},
|
||||
"cwd": "$file_path",
|
||||
"syntax": "Packages/JavaScript/JavaScript.tmLanguage",
|
||||
"external_id": "js",
|
||||
"autocomplete_server": true,
|
||||
"extend_env": {"NODE_NO_READLINE": 1}
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,38 @@
|
||||
(function () {
|
||||
|
||||
var repl = require('repl');
|
||||
|
||||
var rep = repl.start({
|
||||
prompt: null, //'> ',
|
||||
source: null, //process.stdin,
|
||||
eval: null, //require('vm').runInThisContext,
|
||||
useGlobal: true, //false
|
||||
useColors: false
|
||||
});
|
||||
|
||||
|
||||
var net = require('net');
|
||||
var ac_port = process.env.SUBLIMEREPL_AC_PORT;
|
||||
var client = new net.Socket();
|
||||
client.connect(ac_port, "localhost", function() {});
|
||||
|
||||
client.on('data', function(data) {
|
||||
var strData = data.toString();
|
||||
var index = strData.indexOf(":");
|
||||
var json = strData.slice(index+1, strData.length - 1)
|
||||
var inData = JSON.parse(json);
|
||||
var wordIndex = inData.line.slice(inData.cursor_pos).search(/\b/);
|
||||
if(wordIndex !== 0){
|
||||
inData.line = inData.line.slice(0, inData.cursor_pos);
|
||||
}
|
||||
|
||||
var send = function (_, completions) {
|
||||
var comps = completions[0];
|
||||
var msg = JSON.stringify([inData.line, comps]);
|
||||
var payload = msg.length + ":" + msg + ",";
|
||||
client.write(payload)
|
||||
}
|
||||
rep.rli.completer(inData.line, send);
|
||||
});
|
||||
|
||||
})();
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Octave",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_octave",
|
||||
"file": "config/Octave/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,28 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "Octave",
|
||||
"id": "repl_octave",
|
||||
"mnemonic": "o",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": ["octave", "-i"],
|
||||
"cwd": "$file_path",
|
||||
"external_id": "octave",
|
||||
"additional_scopes": ["matlab"],
|
||||
"syntax": "Packages/Matlab/Matlab.tmLanguage"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: PHP",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_php",
|
||||
"file": "config/PHP/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,33 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "PHP",
|
||||
"id": "repl_php",
|
||||
"mnemonic": "s",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": {"windows": "$win_cmd_encoding",
|
||||
"linux": "utf-8",
|
||||
"osx": "utf-8"},
|
||||
"cmd": {"windows": ["php.exe", "-a"],
|
||||
"linux": ["php", "-a"],
|
||||
"osx": ["php", "-a"]},
|
||||
"cwd": "$file_path",
|
||||
"cmd_postfix": "\n",
|
||||
"env": {},
|
||||
"suppress_echo": false,
|
||||
"syntax": "Packages/Text/Plain text.tmLanguage"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Perl",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_Perl",
|
||||
"file": "config/Perl/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,27 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "Perl",
|
||||
"id": "repl_Perl",
|
||||
"mnemonic": "p",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": ["perl","${packages}/SublimeREPL/config/Perl/re.pl"],
|
||||
"cwd": "$file_path",
|
||||
"external_id": "perl",
|
||||
"syntax": "Packages/Perl/Perl.tmLanguage"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,13 @@
|
||||
$| = 1;
|
||||
|
||||
while(true) {
|
||||
print "perl> ";
|
||||
$line=<>;
|
||||
$value=eval($line);
|
||||
$error=$@;
|
||||
if( $error ne "" ) {
|
||||
print $error;
|
||||
} else {
|
||||
print "$value\n";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: PowerShell",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_powershell",
|
||||
"file": "config/PowerShell/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,27 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "PowerShell",
|
||||
"id": "repl_powershell",
|
||||
"mnemonic": "p",
|
||||
"args": {
|
||||
"type": "powershell",
|
||||
"encoding": "",
|
||||
"cmd": ["powershell", "-"],
|
||||
"cwd": "$file_path",
|
||||
"external_id": "powershell",
|
||||
"syntax": "Packages/PowerShell/Support/PowershellSyntax.tmLanguage"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,38 @@
|
||||
[
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,86 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"caption": "Python",
|
||||
"id": "Python",
|
||||
|
||||
"children":[
|
||||
{"command": "repl_open",
|
||||
"caption": "Python",
|
||||
"id": "repl_python",
|
||||
"mnemonic": "p",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": ["python", "-i", "-u"],
|
||||
"cwd": "$file_path",
|
||||
"syntax": "Packages/Python/Python.tmLanguage",
|
||||
"external_id": "python",
|
||||
"extend_env": {"PYTHONIOENCODING": "utf-8"}
|
||||
}
|
||||
},
|
||||
{"command": "python_virtualenv_repl",
|
||||
"id": "python_virtualenv_repl",
|
||||
"caption": "Python - virtualenv"},
|
||||
{"command": "repl_open",
|
||||
"caption": "Python - PDB current file",
|
||||
"id": "repl_python_pdb",
|
||||
"mnemonic": "d",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": ["python", "-i", "-u", "-m", "pdb", "$file_basename"],
|
||||
"cwd": "$file_path",
|
||||
"syntax": "Packages/Python/Python.tmLanguage",
|
||||
"external_id": "python",
|
||||
"extend_env": {"PYTHONIOENCODING": "utf-8"}
|
||||
}
|
||||
},
|
||||
{"command": "repl_open",
|
||||
"caption": "Python - RUN current file",
|
||||
"id": "repl_python_run",
|
||||
"mnemonic": "d",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": ["python", "-u", "$file_basename"],
|
||||
"cwd": "$file_path",
|
||||
"syntax": "Packages/Python/Python.tmLanguage",
|
||||
"external_id": "python",
|
||||
"extend_env": {"PYTHONIOENCODING": "utf-8"}
|
||||
}
|
||||
},
|
||||
{"command": "repl_open",
|
||||
"caption": "Python - IPython",
|
||||
"id": "repl_python_ipython",
|
||||
"mnemonic": "p",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"autocomplete_server": true,
|
||||
"cmd": {
|
||||
"osx": ["python", "-u", "${packages}/SublimeREPL/config/Python/ipy_repl.py"],
|
||||
"linux": ["python", "-u", "${packages}/SublimeREPL/config/Python/ipy_repl.py"],
|
||||
"windows": ["python", "-u", "${packages}/SublimeREPL/config/Python/ipy_repl.py"]
|
||||
},
|
||||
"cwd": "$file_path",
|
||||
"syntax": "Packages/Python/Python.tmLanguage",
|
||||
"external_id": "python",
|
||||
"extend_env": {
|
||||
"PYTHONIOENCODING": "utf-8",
|
||||
"SUBLIMEREPL_EDITOR": "$editor"
|
||||
}
|
||||
}
|
||||
}
|
||||
]}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,118 @@
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import socket
|
||||
import threading
|
||||
|
||||
activate_this = os.environ.get("SUBLIMEREPL_ACTIVATE_THIS", None)
|
||||
|
||||
# turn off pager
|
||||
os.environ['TERM'] = 'emacs'
|
||||
|
||||
if activate_this:
|
||||
with open(activate_this, "r") as f:
|
||||
exec(f.read(), {"__file__": activate_this})
|
||||
|
||||
try:
|
||||
import IPython
|
||||
IPYTHON = True
|
||||
except ImportError:
|
||||
IPYTHON = False
|
||||
|
||||
if not IPYTHON:
|
||||
# for virtualenvs w/o IPython
|
||||
import code
|
||||
code.InteractiveConsole().interact()
|
||||
|
||||
from IPython.config.loader import Config
|
||||
|
||||
editor = "subl -w"
|
||||
|
||||
cfg = Config()
|
||||
cfg.InteractiveShell.use_readline = False
|
||||
cfg.InteractiveShell.autoindent = False
|
||||
cfg.InteractiveShell.colors = "NoColor"
|
||||
cfg.InteractiveShell.editor = os.environ.get("SUBLIMEREPL_EDITOR", editor)
|
||||
|
||||
try:
|
||||
# IPython 1.0.0
|
||||
from IPython.terminal.console.app import ZMQTerminalIPythonApp
|
||||
|
||||
def kernel_client(zmq_shell):
|
||||
return zmq_shell.kernel_client
|
||||
except ImportError:
|
||||
# Older IPythons
|
||||
from IPython.frontend.terminal.console.app import ZMQTerminalIPythonApp
|
||||
|
||||
def kernel_client(zmq_shell):
|
||||
return zmq_shell.kernel_manager
|
||||
|
||||
|
||||
embedded_shell = ZMQTerminalIPythonApp(config=cfg, user_ns={})
|
||||
embedded_shell.initialize()
|
||||
|
||||
if os.name == "nt":
|
||||
# OMG what a fugly hack
|
||||
import IPython.utils.io as io
|
||||
io.stdout = io.IOStream(sys.__stdout__, fallback=io.devnull)
|
||||
io.stderr = io.IOStream(sys.__stderr__, fallback=io.devnull)
|
||||
embedded_shell.shell.show_banner() # ... my eyes, oh my eyes..
|
||||
|
||||
|
||||
ac_port = int(os.environ.get("SUBLIMEREPL_AC_PORT", "0"))
|
||||
ac_ip = os.environ.get("SUBLIMEREPL_AC_IP", "127.0.0.1")
|
||||
if ac_port:
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.connect((ac_ip, ac_port))
|
||||
|
||||
|
||||
def read_netstring(s):
|
||||
size = 0
|
||||
while True:
|
||||
ch = s.recv(1)
|
||||
if ch == b':':
|
||||
break
|
||||
size = size * 10 + int(ch)
|
||||
msg = b""
|
||||
while size != 0:
|
||||
msg += s.recv(size)
|
||||
size -= len(msg)
|
||||
ch = s.recv(1)
|
||||
assert ch == b','
|
||||
return msg
|
||||
|
||||
|
||||
def send_netstring(sock, msg):
|
||||
payload = b"".join([str(len(msg)).encode("ascii"), b':', msg.encode("utf-8"), b','])
|
||||
sock.sendall(payload)
|
||||
|
||||
|
||||
def complete(zmq_shell, req):
|
||||
kc = kernel_client(zmq_shell)
|
||||
msg_id = kc.shell_channel.complete(**req)
|
||||
msg = kc.shell_channel.get_msg(timeout=0.5)
|
||||
if msg['parent_header']['msg_id'] == msg_id:
|
||||
return msg["content"]["matches"]
|
||||
return []
|
||||
|
||||
|
||||
def handle():
|
||||
while True:
|
||||
msg = read_netstring(s).decode("utf-8")
|
||||
try:
|
||||
req = json.loads(msg)
|
||||
completions = complete(embedded_shell, req)
|
||||
result = (req["text"], completions)
|
||||
res = json.dumps(result)
|
||||
send_netstring(s, res)
|
||||
except Exception:
|
||||
send_netstring(s, b"[]")
|
||||
|
||||
if ac_port:
|
||||
t = threading.Thread(target=handle)
|
||||
t.start()
|
||||
|
||||
embedded_shell.start()
|
||||
|
||||
if ac_port:
|
||||
s.close()
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: R",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_r",
|
||||
"file": "config/R/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,42 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "R",
|
||||
"id": "repl_r",
|
||||
"mnemonic": "r",
|
||||
"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": ["R", "--interactive", "--no-readline"],
|
||||
"osx": ["R", "--interactive", "--no-readline"],
|
||||
"windows": ["Rterm.exe", "--ess", "--encoding=$win_cmd_encoding"]},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Racket",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_plt_racket",
|
||||
"file": "config/Racket/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,28 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children": [
|
||||
{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children": [
|
||||
{
|
||||
"command": "repl_open",
|
||||
"caption": "Racket",
|
||||
"id": "repl_plt_racket",
|
||||
"mnemonic": "n",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": ["racket"],
|
||||
"cwd": "$file_path",
|
||||
"syntax": "Packages/Racket/Racket.tmLanguage",
|
||||
"external_id": "racket"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Rails",
|
||||
"command": "run_existing_window_command",
|
||||
"args": {
|
||||
"id": "repl_rails",
|
||||
"file": "config/Rails/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,37 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "Rails",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{
|
||||
"command": "repl_open",
|
||||
"caption": "Rails",
|
||||
"id": "repl_rails",
|
||||
"external_id":"rails",
|
||||
"mnemonic": "r",
|
||||
"args":
|
||||
{
|
||||
"type": "subprocess",
|
||||
"encoding": {"windows": "$win_cmd_encoding",
|
||||
"linux": "utf-8",
|
||||
"osx": "utf-8"},
|
||||
"cmd": { "windows": ["ruby.exe", "${packages}/SublimeREPL/config/Rails/pry_repl.rb", "$editor"],
|
||||
"linux": ["ruby", "${packages}/SublimeREPL/config/Rails/pry_repl.rb", "$editor"],
|
||||
"osx": ["ruby", "${packages}/SublimeREPL/config/Rails/pry_repl.rb", "$editor"] },
|
||||
"env": {},
|
||||
"soft_quit":"\nexit\n",
|
||||
"cwd":"$folder",
|
||||
"cmd_postfix":"\n",
|
||||
"autocomplete_server": true,
|
||||
"syntax": "Packages/Ruby/Ruby.tmLanguage"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,71 @@
|
||||
# Simply merged `pry_repl.rb` from the Ruby REPL and - https://github.com/doitian/rails-console-pry
|
||||
|
||||
require 'rubygems'
|
||||
gem 'pry'
|
||||
require 'pry'
|
||||
require 'thread'
|
||||
require 'json'
|
||||
require 'pry-rails/version'
|
||||
pry_rails_path = Gem.loaded_specs['pry-rails']
|
||||
|
||||
class PryInput
|
||||
def readline(prompt)
|
||||
$stdout.print prompt
|
||||
$stdout.flush
|
||||
$stdin.readline
|
||||
end
|
||||
end
|
||||
|
||||
class PryOutput
|
||||
def puts(data="")
|
||||
$stdout.puts(data.gsub('`', "'"))
|
||||
$stdout.flush
|
||||
end
|
||||
end
|
||||
|
||||
Pry.config.input = PryInput.new()
|
||||
Pry.config.output = PryOutput.new()
|
||||
Pry.config.color = false
|
||||
Pry.config.editor = ARGV[0]
|
||||
Pry.config.auto_indent = false
|
||||
Pry.config.correct_indent = false
|
||||
|
||||
port = ENV["SUBLIMEREPL_AC_PORT"].to_i
|
||||
|
||||
completer = Pry::InputCompleter.build_completion_proc(binding)
|
||||
|
||||
def read_netstring(s)
|
||||
size = 0
|
||||
while true
|
||||
ch = s.recvfrom(1)[0]
|
||||
if ch == ':'
|
||||
break
|
||||
end
|
||||
size = size * 10 + ch.to_i
|
||||
end
|
||||
msg = ""
|
||||
while size != 0
|
||||
msg += s.recvfrom(size)[0]
|
||||
size -= msg.length
|
||||
end
|
||||
ch = s.recvfrom(1)[0]
|
||||
return msg
|
||||
end
|
||||
|
||||
ENV['RAILS_ENV'] = "development"
|
||||
|
||||
APP_PATH = File.expand_path('config/application')
|
||||
require APP_PATH
|
||||
|
||||
if ::Rails::VERSION::MAJOR >= 3
|
||||
class ::Rails::Console
|
||||
end
|
||||
end
|
||||
|
||||
ARGV.unshift "console"
|
||||
|
||||
$: << File.join(pry_rails_path.full_gem_path, 'lib')
|
||||
require 'pry-rails'
|
||||
|
||||
require 'rails/commands'
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Ruby",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_ruby",
|
||||
"file": "config/Ruby/Main.sublime-menu"
|
||||
}
|
||||
},
|
||||
{
|
||||
"caption": "SublimeREPL: Ruby IRB (deprecated)",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_ruby_irb",
|
||||
"file": "config/Ruby/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,85 @@
|
||||
[
|
||||
{
|
||||
"id":"tools",
|
||||
"children":[
|
||||
{
|
||||
"caption":"SublimeREPL",
|
||||
"mnemonic":"r",
|
||||
"id":"SublimeREPL",
|
||||
"children":[
|
||||
{
|
||||
"caption":"Ruby",
|
||||
"children":[
|
||||
{
|
||||
"command":"repl_open",
|
||||
"caption":"Ruby",
|
||||
"id":"repl_ruby",
|
||||
"mnemonic":"r",
|
||||
"args":{
|
||||
"type":"subprocess",
|
||||
"external_id":"ruby",
|
||||
"encoding":"utf8",
|
||||
"cmd":{
|
||||
"windows":[
|
||||
"ruby.exe",
|
||||
"${packages}/SublimeREPL/config/Ruby/pry_repl.rb",
|
||||
"$editor"
|
||||
],
|
||||
"linux":[
|
||||
"ruby",
|
||||
"${packages}/SublimeREPL/config/Ruby/pry_repl.rb",
|
||||
"$editor"
|
||||
],
|
||||
"osx":[
|
||||
"ruby",
|
||||
"${packages}/SublimeREPL/config/Ruby/pry_repl.rb",
|
||||
"$editor"
|
||||
]
|
||||
},
|
||||
"soft_quit":"\nexit\n",
|
||||
"cwd":"$file_path",
|
||||
"cmd_postfix":"\n",
|
||||
"autocomplete_server": true,
|
||||
"syntax":"Packages/Ruby/Ruby.tmLanguage"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command":"repl_open",
|
||||
"caption":"Ruby - IRB (deprecated)",
|
||||
"id":"repl_ruby_irb",
|
||||
"mnemonic":"r",
|
||||
"args":{
|
||||
"type":"subprocess",
|
||||
"external_id":"ruby",
|
||||
"encoding":"utf8",
|
||||
"cmd":{
|
||||
"windows":[
|
||||
"irb.bat",
|
||||
"--noreadline",
|
||||
"--inf-ruby-mode"
|
||||
],
|
||||
"linux":[
|
||||
"irb",
|
||||
"--noreadline",
|
||||
"--inf-ruby-mode"
|
||||
],
|
||||
"osx":[
|
||||
"irb",
|
||||
"--noreadline",
|
||||
"--inf-ruby-mode"
|
||||
]
|
||||
},
|
||||
"soft_quit":"\nexit\n",
|
||||
"cwd":"$file_path",
|
||||
"cmd_postfix":"\n",
|
||||
"suppress_echo":true,
|
||||
"syntax":"Packages/Ruby/Ruby.tmLanguage"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,72 @@
|
||||
require 'rubygems'
|
||||
gem 'pry'
|
||||
require 'pry'
|
||||
require 'socket'
|
||||
require 'thread'
|
||||
require 'json'
|
||||
|
||||
include Socket::Constants
|
||||
|
||||
class PryInput
|
||||
def readline(prompt)
|
||||
$stdout.print prompt
|
||||
$stdout.flush
|
||||
$stdin.readline
|
||||
end
|
||||
end
|
||||
|
||||
class PryOutput
|
||||
def puts(data="")
|
||||
$stdout.puts(data.gsub('`', "'"))
|
||||
$stdout.flush
|
||||
end
|
||||
end
|
||||
|
||||
Pry.config.input = PryInput.new()
|
||||
Pry.config.output = PryOutput.new()
|
||||
Pry.config.color = false
|
||||
Pry.config.editor = ARGV[0]
|
||||
Pry.config.auto_indent = false
|
||||
Pry.config.correct_indent = false
|
||||
|
||||
port = ENV["SUBLIMEREPL_AC_PORT"].to_i
|
||||
|
||||
socket = Socket.new(AF_INET, SOCK_STREAM, 0)
|
||||
sockaddr = Socket.pack_sockaddr_in(port, '127.0.0.1')
|
||||
socket.connect(sockaddr)
|
||||
completer = Pry::InputCompleter.build_completion_proc(binding)
|
||||
|
||||
def read_netstring(s)
|
||||
size = 0
|
||||
while true
|
||||
ch = s.recvfrom(1)[0]
|
||||
if ch == ':'
|
||||
break
|
||||
end
|
||||
size = size * 10 + ch.to_i
|
||||
end
|
||||
msg = ""
|
||||
while size != 0
|
||||
msg += s.recvfrom(size)[0]
|
||||
size -= msg.length
|
||||
end
|
||||
ch = s.recvfrom(1)[0]
|
||||
return msg
|
||||
end
|
||||
|
||||
# Thread.abort_on_exception = true
|
||||
t1 = Thread.new do
|
||||
while true
|
||||
data = read_netstring(socket)
|
||||
req = JSON.parse(data)
|
||||
line = req["line"]
|
||||
completions = completer.call(req["line"])
|
||||
response = [line, completions]
|
||||
response_msg = JSON.dump(response)
|
||||
payload = response_msg.length.to_s + ":" + response_msg + ","
|
||||
socket.write(payload)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Pry.start self
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: SML",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_sml",
|
||||
"file": "config/SML/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "SML",
|
||||
"id": "repl_sml",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": ["sml"],
|
||||
"cwd": "$file_path",
|
||||
"external_id": "sml",
|
||||
"syntax": "Packages/SML (Standard ML)/sml.tmLanguage"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,18 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Scala",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_scala",
|
||||
"file": "config/Scala/Main.sublime-menu"
|
||||
}
|
||||
},
|
||||
{
|
||||
"caption": "SublimeREPL: SBT for opened folder",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_sbt",
|
||||
"file": "config/Scala/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,61 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"caption": "Scala",
|
||||
"id": "Scala",
|
||||
|
||||
"children":[
|
||||
{"command": "repl_open",
|
||||
"caption": "scala REPL",
|
||||
"id": "repl_scala",
|
||||
"mnemonic": "s",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"external_id": "scala",
|
||||
"cmd": {"linux": ["scala"],
|
||||
"osx": ["scala"],
|
||||
"windows": ["scala.bat", "-i"]},
|
||||
"soft_quit": "\nexit\n",
|
||||
"cwd": "$file_path",
|
||||
"cmd_postfix": "\n",
|
||||
"extend_env": {"osx": {"EMACS": "1", "PATH": "{PATH}:/usr/local/bin"},
|
||||
"linux": {"EMACS": "1", "PATH": "{PATH}:/usr/local/bin"},
|
||||
"windows": {"EMACS": "1"}},
|
||||
"suppress_echo": false,
|
||||
"syntax": "Packages/Scala/Scala.tmLanguage"
|
||||
}
|
||||
},
|
||||
{"command": "repl_open",
|
||||
"caption": "SBT for opened folder",
|
||||
"id": "repl_sbt",
|
||||
"mnemonic": "b",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"external_id": "scala",
|
||||
"cmd": {"linux": ["sbt"],
|
||||
"osx": ["sbt"],
|
||||
"windows": ["sbt"]},
|
||||
"soft_quit": "\nexit\n",
|
||||
"cwd": "$folder",
|
||||
"cmd_postfix": "\n",
|
||||
"extend_env": {"osx": {"EMACS": "1", "PATH": "{PATH}:/usr/local/bin"},
|
||||
"linux": {"EMACS": "1", "PATH": "{PATH}:/usr/local/bin"},
|
||||
"windows": {"EMACS": "1"}},
|
||||
"suppress_echo": false,
|
||||
"syntax": "Packages/Scala/Scala.tmLanguage"
|
||||
}
|
||||
}
|
||||
]}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Scheme",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_scheme",
|
||||
"file": "config/Scheme/Main.sublime-menu"
|
||||
}
|
||||
},
|
||||
{
|
||||
"caption": "SublimeREPL: Gauche",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_gauche",
|
||||
"file": "config/Scheme/Main.sublime-menu"
|
||||
}
|
||||
},
|
||||
{
|
||||
"caption": "SublimeREPL: Petite Chez Scheme",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_petite",
|
||||
"file": "config/Scheme/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,73 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"caption": "Scheme",
|
||||
"id": "Scheme",
|
||||
|
||||
"children":[
|
||||
{"command": "repl_open",
|
||||
"caption": "Scheme",
|
||||
"id": "repl_scheme",
|
||||
"mnemonic": "r",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"external_id": "scheme",
|
||||
"cmd": {"linux": ["scheme"],
|
||||
"osx": ["scheme"],
|
||||
"windows": ["scheme"]},
|
||||
"soft_quit": "\nexit\n",
|
||||
"cwd": "$folder",
|
||||
"cmd_postfix": "\n",
|
||||
"extend_env": {"INSIDE_EMACS": "1"},
|
||||
"syntax": "Packages/sublime-scheme-syntax/Scheme.tmLanguage"
|
||||
}
|
||||
},
|
||||
{"command": "repl_open",
|
||||
"caption": "Gauche",
|
||||
"id": "repl_gauche",
|
||||
"mnemonic": "r",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"external_id": "gauche",
|
||||
"cmd": {"linux": ["gosh", "-i"],
|
||||
"osx": ["gosh", "-i"],
|
||||
"windows": ["gosh", "-i"]},
|
||||
"soft_quit": "\n(exit)\n",
|
||||
"cwd": "$folder",
|
||||
"cmd_postfix": "\n",
|
||||
"extend_env": {"INSIDE_EMACS": "1"},
|
||||
"syntax": "Packages/Gauche/Gauche.tmLanguage"
|
||||
}
|
||||
},
|
||||
{"command": "repl_open",
|
||||
"caption": "Petite Chez Scheme",
|
||||
"id": "repl_petite",
|
||||
"mnemonic": "r",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"external_id": "petite",
|
||||
"cmd": {"linux": ["petite"],
|
||||
"osx": ["petite"],
|
||||
"windows": ["petite"]},
|
||||
"soft_quit": "\n(exit)\n",
|
||||
"cwd": "$folder",
|
||||
"cmd_postfix": "\n",
|
||||
"extend_env": {"INSIDE_EMACS": "1"},
|
||||
"syntax": "Packages/sublime-scheme-syntax/Scheme.tmLanguage"
|
||||
}
|
||||
}
|
||||
]}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: ScriptCS",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_scriptcs",
|
||||
"file": "config/ScriptCS/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,31 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "ScriptCS",
|
||||
"id": "repl_scriptcs",
|
||||
"mnemonic": "scs",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"external_id": "scriptcs",
|
||||
"encoding": "utf8",
|
||||
"cmd": {
|
||||
"windows": ["scriptcs"],
|
||||
"osx": ["scriptcs"],
|
||||
"linux": ["scriptcs"]},
|
||||
"cwd": "$file_path",
|
||||
"additional_scopes": ["csx"],
|
||||
"syntax": "Packages/scriptcs/ScriptCs.tmLanguage"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Shell",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_shell",
|
||||
"file": "config/Shell/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,34 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "Shell",
|
||||
"id": "repl_shell",
|
||||
"mnemonic": "s",
|
||||
"args": {
|
||||
"type": "subprocess",
|
||||
"encoding": {"windows": "$win_cmd_encoding",
|
||||
"linux": "utf-8",
|
||||
"osx": "utf-8"},
|
||||
"cmd": {"windows": ["cmd.exe"],
|
||||
"linux": ["bash", "-i"],
|
||||
"osx": ["bash", "-i"]},
|
||||
"cwd": "$file_path",
|
||||
"cmd_postfix": "\n",
|
||||
"env": {},
|
||||
"suppress_echo": true,
|
||||
"external_id": "shell",
|
||||
"syntax": "Packages/Text/Plain text.tmLanguage"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Python - Sublime Text Console",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_sublime_python",
|
||||
"file": "config/Sublime/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,23 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"caption": "Sublime",
|
||||
"id": "repl_sublime_python",
|
||||
"args": {
|
||||
"type": "sublime_python",
|
||||
"encoding": "utf8",
|
||||
"syntax": "Packages/Python/Python.tmLanguage"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"caption": "SublimeREPL: Tower Console",
|
||||
"command": "run_existing_window_command", "args":
|
||||
{
|
||||
"id": "repl_tower",
|
||||
"file": "config/Tower/Main.sublime-menu"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,27 @@
|
||||
[
|
||||
{
|
||||
"id": "tools",
|
||||
"children":
|
||||
[{
|
||||
"caption": "SublimeREPL",
|
||||
"mnemonic": "r",
|
||||
"id": "SublimeREPL",
|
||||
"children":
|
||||
[
|
||||
{"command": "repl_open",
|
||||
"id": "repl_tower",
|
||||
"caption": "Tower Console",
|
||||
"args": {
|
||||
"cwd": "$file_path",
|
||||
"type": "subprocess",
|
||||
"encoding": "utf8",
|
||||
"cmd": ["tower", "console", "-c"],
|
||||
"syntax": "Packages/CoffeeScript/CoffeeScript.tmLanguage",
|
||||
"external_id": "tower",
|
||||
"extend_env": {"NODE_DISABLE_COLORS": "1"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user