diff options
author | Valerio Virgillito | 2012-02-15 16:09:47 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-15 16:09:47 -0800 |
commit | d366c0bd1af6471511217ed574083e15059519b5 (patch) | |
tree | c8c9f9af761457e3c5f4c6774fb0fbba851df0c4 /imports | |
parent | 997ce3fb65f27b3d6f331f63b5dc22d3c7fb8f1e (diff) | |
parent | b85bfb54aaca3ccca3c1ef09115de925cd67f4e9 (diff) | |
download | ninja-d366c0bd1af6471511217ed574083e15059519b5.tar.gz |
Merge branch 'refs/heads/integration'
Diffstat (limited to 'imports')
104 files changed, 15457 insertions, 0 deletions
diff --git a/imports/codemirror/LICENSE b/imports/codemirror/LICENSE new file mode 100755 index 00000000..3f7c0bb1 --- /dev/null +++ b/imports/codemirror/LICENSE | |||
@@ -0,0 +1,19 @@ | |||
1 | Copyright (C) 2011 by Marijn Haverbeke <marijnh@gmail.com> | ||
2 | |||
3 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
4 | of this software and associated documentation files (the "Software"), to deal | ||
5 | in the Software without restriction, including without limitation the rights | ||
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
7 | copies of the Software, and to permit persons to whom the Software is | ||
8 | furnished to do so, subject to the following conditions: | ||
9 | |||
10 | The above copyright notice and this permission notice shall be included in | ||
11 | all copies or substantial portions of the Software. | ||
12 | |||
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
19 | THE SOFTWARE. | ||
diff --git a/imports/codemirror/keymap/emacs.js b/imports/codemirror/keymap/emacs.js new file mode 100755 index 00000000..8fd3564e --- /dev/null +++ b/imports/codemirror/keymap/emacs.js | |||
@@ -0,0 +1,29 @@ | |||
1 | // TODO number prefixes | ||
2 | (function() { | ||
3 | // Really primitive kill-ring implementation. | ||
4 | var killRing = []; | ||
5 | function addToRing(str) { | ||
6 | killRing.push(str); | ||
7 | if (killRing.length > 50) killRing.shift(); | ||
8 | } | ||
9 | function getFromRing() { return killRing[killRing.length - 1] || ""; } | ||
10 | function popFromRing() { if (killRing.length > 1) killRing.pop(); return getFromRing(); } | ||
11 | |||
12 | CodeMirror.keyMap.emacs = { | ||
13 | "Ctrl-X": function(cm) {cm.setOption("keyMap", "emacs-Ctrl-X");}, | ||
14 | "Ctrl-W": function(cm) {addToRing(cm.getSelection()); cm.replaceSelection("");}, | ||
15 | "Ctrl-Alt-W": function(cm) {addToRing(cm.getSelection()); cm.replaceSelection("");}, | ||
16 | "Alt-W": function(cm) {addToRing(cm.getSelection());}, | ||
17 | "Ctrl-Y": function(cm) {cm.replaceSelection(getFromRing());}, | ||
18 | "Alt-Y": function(cm) {cm.replaceSelection(popFromRing());}, | ||
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", | ||
21 | "Ctrl-Z": "undo", "Cmd-Z": "undo", | ||
22 | fallthrough: ["basic", "emacsy"] | ||
23 | }; | ||
24 |