backing up sublime settings

This commit is contained in:
2014-04-04 11:21:58 -04:00
commit 2cbece8593
274 changed files with 23793 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
[
{
"caption": "SublimeREPL: Node",
"command": "run_existing_window_command", "args":
{
"id": "repl_node",
"file": "config/NodeJS/Main.sublime-menu"
}
}
]

View File

@@ -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}
}
}
]
}]
}
]

View File

@@ -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);
});
})();