aboutsummaryrefslogtreecommitdiff
path: root/imports
diff options
context:
space:
mode:
authorKruti Shah2012-07-17 12:40:00 -0700
committerKruti Shah2012-07-17 12:40:00 -0700
commitbf2d7bdb22c28089dc1067bc9094ebc590daac87 (patch)
tree2156d9920ea1b7db49ed6460545fea7cda121bae /imports
parent7e2c2dbd040ed79a3f0678f91bd4b6db9cf69231 (diff)
parentb4b3e45d6684e77d361b4f8ca5be4889428320c5 (diff)
downloadninja-bf2d7bdb22c28089dc1067bc9094ebc590daac87.tar.gz
Merge branch 'refs/heads/TimelineUberJD' into Timeline-local-kruti
Diffstat (limited to 'imports')
-rw-r--r--imports/codemirror/LICENSE2
-rw-r--r--imports/codemirror/keymap/emacs.js4
-rw-r--r--imports/codemirror/keymap/vim.js927
-rw-r--r--imports/codemirror/lib/codemirror.css64
-rw-r--r--imports/codemirror/lib/codemirror.js619
-rw-r--r--imports/codemirror/lib/util/closetag.js28
-rw-r--r--imports/codemirror/lib/util/foldcode.js36
-rw-r--r--imports/codemirror/lib/util/formatting.js9
-rw-r--r--imports/codemirror/lib/util/loadmode.js51
-rw-r--r--imports/codemirror/lib/util/match-highlighter.js2
-rw-r--r--imports/codemirror/lib/util/multiplex.js72
-rw-r--r--imports/codemirror/lib/util/overlay.js5
-rw-r--r--imports/codemirror/lib/util/pig-hint.js123
-rw-r--r--imports/codemirror/lib/util/search.js32
-rw-r--r--imports/codemirror/lib/util/searchcursor.js2
-rw-r--r--imports/codemirror/mode/clike/clike.js39
-rw-r--r--imports/codemirror/mode/clike/scala.html765
-rw-r--r--imports/codemirror/mode/coffeescript/coffeescript.js6
-rw-r--r--imports/codemirror/mode/coffeescript/index.html6
-rw-r--r--imports/codemirror/mode/diff/diff.css3
-rw-r--r--imports/codemirror/mode/diff/diff.js29
-rw-r--r--imports/codemirror/mode/diff/index.html13
-rw-r--r--imports/codemirror/mode/ecl/ecl.js2
-rw-r--r--imports/codemirror/mode/erlang/erlang.js251
-rw-r--r--imports/codemirror/mode/erlang/index.html61
-rw-r--r--imports/codemirror/mode/gfm/gfm.js42
-rw-r--r--imports/codemirror/mode/htmlembedded/htmlembedded.js2
-rw-r--r--imports/codemirror/mode/htmlmixed/htmlmixed.js4
-rw-r--r--imports/codemirror/mode/javascript/javascript.js9
-rw-r--r--imports/codemirror/mode/less/index.html25
-rw-r--r--imports/codemirror/mode/less/less.js42
-rw-r--r--imports/codemirror/mode/markdown/markdown.js2
-rw-r--r--imports/codemirror/mode/php/php.js2
-rw-r--r--imports/codemirror/mode/pig/index.html42
-rw-r--r--imports/codemirror/mode/pig/pig.js172
-rw-r--r--imports/codemirror/mode/python/python.js30
-rw-r--r--imports/codemirror/mode/rst/rst.js2
-rw-r--r--imports/codemirror/mode/ruby/ruby.js11
-rw-r--r--imports/codemirror/mode/scheme/scheme.js120
-rw-r--r--imports/codemirror/mode/shell/index.html50
-rw-r--r--imports/codemirror/mode/shell/shell.js103
-rw-r--r--imports/codemirror/mode/stex/stex.js10
-rw-r--r--imports/codemirror/mode/stex/test.html12
-rw-r--r--imports/codemirror/mode/tiddlywiki/tiddlywiki.css35
-rw-r--r--imports/codemirror/mode/tiddlywiki/tiddlywiki.js28
-rw-r--r--imports/codemirror/mode/tiki/index.html82
-rw-r--r--imports/codemirror/mode/tiki/tiki.css26
-rw-r--r--imports/codemirror/mode/tiki/tiki.js316
-rw-r--r--imports/codemirror/mode/xml/xml.js69
-rw-r--r--imports/codemirror/mode/xmlpure/index.html58
-rw-r--r--imports/codemirror/mode/xmlpure/xmlpure.js490
-rw-r--r--imports/codemirror/mode/xquery/test/index.html3
-rw-r--r--imports/codemirror/theme/ambiance.css81
-rw-r--r--imports/codemirror/theme/blackboard.css25
-rw-r--r--imports/codemirror/theme/erlang-dark.css21
-rw-r--r--imports/codemirror/theme/lesser-dark.css7
-rw-r--r--imports/codemirror/theme/night.css2
-rw-r--r--imports/codemirror/theme/vibrant-ink.css27
-rwxr-xr-ximports/codemirror/version.txt2
59 files changed, 3859 insertions, 1244 deletions
diff --git a/imports/codemirror/LICENSE b/imports/codemirror/LICENSE
index f62410e6..3916e96b 100644
--- a/imports/codemirror/LICENSE
+++ b/imports/codemirror/LICENSE
@@ -1,4 +1,4 @@
1Copyright (C) 2011 by Marijn Haverbeke <marijnh@gmail.com> 1Copyright (C) 2012 by Marijn Haverbeke <marijnh@gmail.com>
2 2
3Permission is hereby granted, free of charge, to any person obtaining a copy 3Permission is hereby granted, free of charge, to any person obtaining a copy
4of this software and associated documentation files (the "Software"), to deal 4of this software and associated documentation files (the "Software"), to deal
diff --git a/imports/codemirror/keymap/emacs.js b/imports/codemirror/keymap/emacs.js
index 8fd3564e..2a57e2ff 100644
--- a/imports/codemirror/keymap/emacs.js
+++ b/imports/codemirror/keymap/emacs.js
@@ -18,12 +18,12 @@
18 "Alt-Y": function(cm) {cm.replaceSelection(popFromRing());}, 18 "Alt-Y": function(cm) {cm.replaceSelection(popFromRing());},
19 "Ctrl-/": "undo", "Shift-Ctrl--": "undo", "Shift-Alt-,": "goDocStart", "Shift-Alt-.": "goDocEnd", 19 "Ctrl-/": "undo", "Shift-Ctrl--": "undo", "Shift-Alt-,": "goDocStart", "Shift-Alt-.": "goDocEnd",
20 "Ctrl-S": "findNext", "Ctrl-R": "findPrev", "Ctrl-G": "clearSearch", "Shift-Alt-5": "replace", 20 "Ctrl-S": "findNext", "Ctrl-R": "findPrev", "Ctrl-G": "clearSearch", "Shift-Alt-5": "replace",
21 "Ctrl-Z": "undo", "Cmd-Z": "undo", 21 "Ctrl-Z": "undo", "Cmd-Z": "undo", "Alt-/": "autocomplete",
22 fallthrough: ["basic", "emacsy"] 22 fallthrough: ["basic", "emacsy"]
23 }; 23 };
24 24
25 CodeMirror.keyMap["emacs-Ctrl-X"] = { 25 CodeMirror.keyMap["emacs-Ctrl-X"] = {
26 "Ctrl-S": "save", "Ctrl-W": "save", "S": "saveAll", "F": "open", "U": "undo", "K": "close", 26 "Ctrl-S": "save", "Ctrl-W": "save", "S": "saveAll", "F": "open", "U": "undo", "K": "close",
27 auto: "emacs", catchall: function(cm) {/*ignore*/} 27 auto: "emacs", nofallthrough: true
28 }; 28 };
29})(); 29})();
diff --git a/imports/codemirror/keymap/vim.js b/imports/codemirror/keymap/vim.js
index f8fa5e07..2aa6e0f7 100644
--- a/imports/codemirror/keymap/vim.js
+++ b/imports/codemirror/keymap/vim.js
@@ -1,21 +1,96 @@
1// Supported keybindings:
2//
3// Cursor movement:
4// h, j, k, l
5// e, E, w, W, b, B
6// Ctrl-f, Ctrl-b
7// Ctrl-n, Ctrl-p
8// $, ^, 0
9// G
10// ge, gE
11// gg
12// f<char>, F<char>, t<char>, T<char>
13// Ctrl-o, Ctrl-i TODO (FIXME - Ctrl-O wont work in Chrome)
14// /, ?, n, N TODO (does not work)
15// #, * TODO
16//
17// Entering insert mode:
18// i, I, a, A, o, O
19// s
20// ce, cb (without support for number of actions like c3e - TODO)
21// cc
22// S, C TODO
23// cf<char>, cF<char>, ct<char>, cT<char>
24//
25// Deleting text:
26// x, X
27// J
28// dd, D
29// de, db (without support for number of actions like d3e - TODO)
30// df<char>, dF<char>, dt<char>, dT<char>
31//
32// Yanking and pasting:
33// yy, Y
34// p, P
35// p'<char> TODO - test
36// y'<char> TODO - test
37// m<char> TODO - test
38//
39// Changing text in place:
40// ~
41// r<char>
42//
43// Visual mode:
44// v, V TODO
45//
46// Misc:
47// . TODO
48//
49
1(function() { 50(function() {
2 var count = ""; 51 var count = "";
3 var sdir = "f"; 52 var sdir = "f";
4 var buf = ""; 53 var buf = "";
5 var yank = 0; 54 var yank = 0;
6 var mark = []; 55 var mark = [];
56 var reptTimes = 0;
7 function emptyBuffer() { buf = ""; } 57 function emptyBuffer() { buf = ""; }
8 function pushInBuffer(str) { buf += str; }; 58 function pushInBuffer(str) { buf += str; }
9 function pushCountDigit(digit) { return function(cm) {count += digit;} } 59 function pushCountDigit(digit) { return function(cm) {count += digit;}; }
10 function popCount() { var i = parseInt(count); count = ""; return i || 1; } 60 function popCount() { var i = parseInt(count, 10); count = ""; return i || 1; }
61 function iterTimes(func) {
62 for (var i = 0, c = popCount(); i < c; ++i) func(i, i == c - 1);
63 }
11 function countTimes(func) { 64 function countTimes(func) {
12 if (typeof func == "string") func = CodeMirror.commands[func]; 65 if (typeof func == "string") func = CodeMirror.commands[func];
13 return function(cm) { for (var i = 0, c = popCount(); i < c; ++i) func(cm); } 66 return function(cm) { iterTimes(function () { func(cm); }); };
14 } 67 }
15 68
16 function iterObj(o, f) { 69 function iterObj(o, f) {
17 for (var prop in o) if (o.hasOwnProperty(prop)) f(prop, o[prop]); 70 for (var prop in o) if (o.hasOwnProperty(prop)) f(prop, o[prop]);
18 } 71 }
72 function iterList(l, f) {
73 for (var i in l) f(l[i]);
74 }
75 function toLetter(ch) {
76 // T -> t, Shift-T -> T, '*' -> *, "Space" -> " "
77 if (ch.slice(0, 6) == "Shift-") {
78 return ch.slice(0, 1);
79 } else {
80 if (ch == "Space") return " ";
81 if (ch.length == 3 && ch[0] == "'" && ch[2] == "'") return ch[1];
82 return ch.toLowerCase();
83 }
84 }
85 var SPECIAL_SYMBOLS = "~`!@#$%^&*()_-+=[{}]\\|/?.,<>:;\"\'1234567890";
86 function toCombo(ch) {
87 // t -> T, T -> Shift-T,