codemirror-rails 2.2.1 → 2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. data/README.md +8 -0
  2. data/codemirror-rails.gemspec +1 -1
  3. data/lib/codemirror/rails/version.rb +2 -2
  4. data/vendor/assets/javascripts/codemirror.js +842 -422
  5. data/vendor/assets/javascripts/codemirror/keymaps/emacs.js +2 -2
  6. data/vendor/assets/javascripts/codemirror/keymaps/vim.js +722 -32
  7. data/vendor/assets/javascripts/codemirror/modes/clike.js +31 -9
  8. data/vendor/assets/javascripts/codemirror/modes/clojure.js +14 -14
  9. data/vendor/assets/javascripts/codemirror/modes/coffeescript.js +59 -37
  10. data/vendor/assets/javascripts/codemirror/modes/css.js +1 -1
  11. data/vendor/assets/javascripts/codemirror/modes/diff.js +24 -5
  12. data/vendor/assets/javascripts/codemirror/modes/ecl.js +203 -0
  13. data/vendor/assets/javascripts/codemirror/modes/erlang.js +251 -0
  14. data/vendor/assets/javascripts/codemirror/modes/gfm.js +40 -4
  15. data/vendor/assets/javascripts/codemirror/modes/go.js +170 -0
  16. data/vendor/assets/javascripts/codemirror/modes/htmlembedded.js +1 -1
  17. data/vendor/assets/javascripts/codemirror/modes/htmlmixed.js +4 -2
  18. data/vendor/assets/javascripts/codemirror/modes/javascript.js +10 -9
  19. data/vendor/assets/javascripts/codemirror/modes/less.js +232 -0
  20. data/vendor/assets/javascripts/codemirror/modes/markdown.js +52 -49
  21. data/vendor/assets/javascripts/codemirror/modes/mysql.js +188 -0
  22. data/vendor/assets/javascripts/codemirror/modes/pascal.js +2 -46
  23. data/vendor/assets/javascripts/codemirror/modes/perl.js +1 -1
  24. data/vendor/assets/javascripts/codemirror/modes/php.js +55 -25
  25. data/vendor/assets/javascripts/codemirror/modes/pig.js +172 -0
  26. data/vendor/assets/javascripts/codemirror/modes/properties.js +63 -0
  27. data/vendor/assets/javascripts/codemirror/modes/python.js +37 -32
  28. data/vendor/assets/javascripts/codemirror/modes/rpm-spec.js +1 -1
  29. data/vendor/assets/javascripts/codemirror/modes/rst.js +1 -1
  30. data/vendor/assets/javascripts/codemirror/modes/ruby.js +14 -14
  31. data/vendor/assets/javascripts/codemirror/modes/rust.js +36 -15
  32. data/vendor/assets/javascripts/codemirror/modes/scheme.js +74 -46
  33. data/vendor/assets/javascripts/codemirror/modes/shell.js +103 -0
  34. data/vendor/assets/javascripts/codemirror/modes/smalltalk.js +16 -16
  35. data/vendor/assets/javascripts/codemirror/modes/smarty.js +148 -0
  36. data/vendor/assets/javascripts/codemirror/modes/stex.js +21 -6
  37. data/vendor/assets/javascripts/codemirror/modes/tiddlywiki.js +55 -45
  38. data/vendor/assets/javascripts/codemirror/modes/tiki.js +316 -0
  39. data/vendor/assets/javascripts/codemirror/modes/vbscript.js +26 -0
  40. data/vendor/assets/javascripts/codemirror/modes/verilog.js +194 -0
  41. data/vendor/assets/javascripts/codemirror/modes/xml.js +89 -16
  42. data/vendor/assets/javascripts/codemirror/modes/xmlpure.js +5 -0
  43. data/vendor/assets/javascripts/codemirror/modes/xquery.js +448 -0
  44. data/vendor/assets/javascripts/codemirror/utils/closetag.js +146 -0
  45. data/vendor/assets/javascripts/codemirror/utils/dialog.js +63 -0
  46. data/vendor/assets/javascripts/codemirror/utils/foldcode.js +196 -0
  47. data/vendor/assets/javascripts/codemirror/utils/formatting.js +297 -0
  48. data/vendor/assets/javascripts/codemirror/utils/javascript-hint.js +134 -0
  49. data/vendor/assets/javascripts/codemirror/utils/loadmode.js +51 -0
  50. data/vendor/assets/javascripts/codemirror/utils/match-highlighter.js +44 -0
  51. data/vendor/assets/javascripts/codemirror/utils/multiplex.js +72 -0
  52. data/vendor/assets/javascripts/codemirror/{overlay.js → utils/overlay.js} +3 -2
  53. data/vendor/assets/javascripts/codemirror/utils/pig-hint.js +123 -0
  54. data/vendor/assets/javascripts/codemirror/utils/runmode.js +49 -0
  55. data/vendor/assets/javascripts/codemirror/utils/search.js +118 -0
  56. data/vendor/assets/javascripts/codemirror/utils/searchcursor.js +117 -0
  57. data/vendor/assets/javascripts/codemirror/utils/simple-hint.js +72 -0
  58. data/vendor/assets/stylesheets/codemirror.css +69 -5
  59. data/vendor/assets/stylesheets/codemirror/modes/tiddlywiki.css +14 -21
  60. data/vendor/assets/stylesheets/codemirror/modes/tiki.css +26 -0
  61. data/vendor/assets/stylesheets/codemirror/themes/ambiance.css +81 -0
  62. data/vendor/assets/stylesheets/codemirror/themes/blackboard.css +25 -0
  63. data/vendor/assets/stylesheets/codemirror/themes/cobalt.css +1 -1
  64. data/vendor/assets/stylesheets/codemirror/themes/eclipse.css +1 -1
  65. data/vendor/assets/stylesheets/codemirror/themes/elegant.css +2 -2
  66. data/vendor/assets/stylesheets/codemirror/themes/erlang-dark.css +21 -0
  67. data/vendor/assets/stylesheets/codemirror/themes/lesser-dark.css +44 -0
  68. data/vendor/assets/stylesheets/codemirror/themes/monokai.css +1 -1
  69. data/vendor/assets/stylesheets/codemirror/themes/neat.css +3 -3
  70. data/vendor/assets/stylesheets/codemirror/themes/night.css +1 -1
  71. data/vendor/assets/stylesheets/codemirror/themes/rubyblue.css +2 -2
  72. data/vendor/assets/stylesheets/codemirror/themes/vibrant-ink.css +27 -0
  73. data/vendor/assets/stylesheets/codemirror/themes/xq-dark.css +46 -0
  74. data/vendor/assets/stylesheets/codemirror/utils/dialog.css +23 -0
  75. data/vendor/assets/stylesheets/codemirror/utils/simple-hint.css +16 -0
  76. metadata +41 -10
  77. data/vendor/assets/javascripts/codemirror/runmode.js +0 -27
  78. data/vendor/assets/stylesheets/codemirror/modes/clike.css +0 -7
  79. data/vendor/assets/stylesheets/codemirror/modes/markdown.css +0 -10
  80. data/vendor/assets/stylesheets/codemirror/modes/rst.css +0 -75
  81. data/vendor/assets/stylesheets/codemirror/themes/default.css +0 -19
@@ -0,0 +1,118 @@
1
+ // Define search commands. Depends on dialog.js or another
2
+ // implementation of the openDialog method.
3
+
4
+ // Replace works a little oddly -- it will do the replace on the next
5
+ // Ctrl-G (or whatever is bound to findNext) press. You prevent a
6
+ // replace by making sure the match is no longer selected when hitting
7
+ // Ctrl-G.
8
+
9
+ (function() {
10
+ function SearchState() {
11
+ this.posFrom = this.posTo = this.query = null;
12
+ this.marked = [];
13
+ }
14
+ function getSearchState(cm) {
15
+ return cm._searchState || (cm._searchState = new SearchState());
16
+ }
17
+ function getSearchCursor(cm, query, pos) {
18
+ // Heuristic: if the query string is all lowercase, do a case insensitive search.
19
+ return cm.getSearchCursor(query, pos, typeof query == "string" && query == query.toLowerCase());
20
+ }
21
+ function dialog(cm, text, shortText, f) {
22
+ if (cm.openDialog) cm.openDialog(text, f);
23
+ else f(prompt(shortText, ""));
24
+ }
25
+ function confirmDialog(cm, text, shortText, fs) {
26
+ if (cm.openConfirm) cm.openConfirm(text, fs);
27
+ else if (confirm(shortText)) fs[0]();
28
+ }
29
+ function parseQuery(query) {
30
+ var isRE = query.match(/^\/(.*)\/([a-z]*)$/);
31
+ return isRE ? new RegExp(isRE[1], isRE[2].indexOf("i") == -1 ? "" : "i") : query;
32
+ }
33
+ var queryDialog =
34
+ 'Search: <input type="text" style="width: 10em"/> <span style="color: #888">(Use /re/ syntax for regexp search)</span>';
35
+ function doSearch(cm, rev) {
36
+ var state = getSearchState(cm);
37
+ if (state.query) return findNext(cm, rev);
38
+ dialog(cm, queryDialog, "Search for:", function(query) {
39
+ cm.operation(function() {
40
+ if (!query || state.query) return;
41
+ state.query = parseQuery(query);
42
+ if (cm.lineCount() < 2000) { // This is too expensive on big documents.
43
+ for (var cursor = getSearchCursor(cm, query); cursor.findNext();)
44
+ state.marked.push(cm.markText(cursor.from(), cursor.to(), "CodeMirror-searching"));
45
+ }
46
+ state.posFrom = state.posTo = cm.getCursor();
47
+ findNext(cm, rev);
48
+ });
49
+ });
50
+ }
51
+ function findNext(cm, rev) {cm.operation(function() {
52
+ var state = getSearchState(cm);
53
+ var cursor = getSearchCursor(cm, state.query, rev ? state.posFrom : state.posTo);
54
+ if (!cursor.find(rev)) {
55
+ cursor = getSearchCursor(cm, state.query, rev ? {line: cm.lineCount() - 1} : {line: 0, ch: 0});
56
+ if (!cursor.find(rev)) return;
57
+ }
58
+ cm.setSelection(cursor.from(), cursor.to());
59
+ state.posFrom = cursor.from(); state.posTo = cursor.to();
60
+ })}
61
+ function clearSearch(cm) {cm.operation(function() {
62
+ var state = getSearchState(cm);
63
+ if (!state.query) return;
64
+ state.query = null;
65
+ for (var i = 0; i < state.marked.length; ++i) state.marked[i].clear();
66
+ state.marked.length = 0;
67
+ })}
68
+
69
+ var replaceQueryDialog =
70
+ 'Replace: <input type="text" style="width: 10em"/> <span style="color: #888">(Use /re/ syntax for regexp search)</span>';
71
+ var replacementQueryDialog = 'With: <input type="text" style="width: 10em"/>';
72
+ var doReplaceConfirm = "Replace? <button>Yes</button> <button>No</button> <button>Stop</button>";
73
+ function replace(cm, all) {
74
+ dialog(cm, replaceQueryDialog, "Replace:", function(query) {
75
+ if (!query) return;
76
+ query = parseQuery(query);
77
+ dialog(cm, replacementQueryDialog, "Replace with:", function(text) {
78
+ if (all) {
79
+ cm.compoundChange(function() { cm.operation(function() {
80
+ for (var cursor = getSearchCursor(cm, query); cursor.findNext();) {
81
+ if (typeof query != "string") {
82
+ var match = cm.getRange(cursor.from(), cursor.to()).match(query);
83
+ cursor.replace(text.replace(/\$(\d)/, function(w, i) {return match[i];}));
84
+ } else cursor.replace(text);
85
+ }
86
+ })});
87
+ } else {
88
+ clearSearch(cm);
89
+ var cursor = getSearchCursor(cm, query, cm.getCursor());
90
+ function advance() {
91
+ var start = cursor.from(), match;
92
+ if (!(match = cursor.findNext())) {
93
+ cursor = getSearchCursor(cm, query);
94
+ if (!(match = cursor.findNext()) ||
95
+ (start && cursor.from().line == start.line && cursor.from().ch == start.ch)) return;
96
+ }
97
+ cm.setSelection(cursor.from(), cursor.to());
98
+ confirmDialog(cm, doReplaceConfirm, "Replace?",
99
+ [function() {doReplace(match);}, advance]);
100
+ }
101
+ function doReplace(match) {
102
+ cursor.replace(typeof query == "string" ? text :
103
+ text.replace(/\$(\d)/, function(w, i) {return match[i];}));
104
+ advance();
105
+ }
106
+ advance();
107
+ }
108
+ });
109
+ });
110
+ }
111
+
112
+ CodeMirror.commands.find = function(cm) {clearSearch(cm); doSearch(cm);};
113
+ CodeMirror.commands.findNext = doSearch;
114
+ CodeMirror.commands.findPrev = function(cm) {doSearch(cm, true);};
115
+ CodeMirror.commands.clearSearch = clearSearch;
116
+ CodeMirror.commands.replace = replace;
117
+ CodeMirror.commands.replaceAll = function(cm) {replace(cm, true);};
118
+ })();
@@ -0,0 +1,117 @@
1
+ (function(){
2
+ function SearchCursor(cm, query, pos, caseFold) {
3
+ this.atOccurrence = false; this.cm = cm;
4
+ if (caseFold == null && typeof query == "string") caseFold = false;
5
+
6
+ pos = pos ? cm.clipPos(pos) : {line: 0, ch: 0};
7
+ this.pos = {from: pos, to: pos};
8
+
9
+ // The matches method is filled in based on the type of query.
10
+ // It takes a position and a direction, and returns an object
11
+ // describing the next occurrence of the query, or null if no
12
+ // more matches were found.
13
+ if (typeof query != "string") // Regexp match
14
+ this.matches = function(reverse, pos) {
15
+ if (reverse) {
16
+ var line = cm.getLine(pos.line).slice(0, pos.ch), match = line.match(query), start = 0;
17
+ while (match) {
18
+ var ind = line.indexOf(match[0]);
19
+ start += ind;
20
+ line = line.slice(ind + 1);
21
+ var newmatch = line.match(query);
22
+ if (newmatch) match = newmatch;
23
+ else break;
24
+ start++;
25
+ }
26
+ }
27
+ else {
28
+ var line = cm.getLine(pos.line).slice(pos.ch), match = line.match(query),
29
+ start = match && pos.ch + line.indexOf(match[0]);
30
+ }
31
+ if (match)
32
+ return {from: {line: pos.line, ch: start},
33
+ to: {line: pos.line, ch: start + match[0].length},
34
+ match: match};
35
+ };
36
+ else { // String query
37
+ if (caseFold) query = query.toLowerCase();
38
+ var fold = caseFold ? function(str){return str.toLowerCase();} : function(str){return str;};
39
+ var target = query.split("\n");
40
+ // Different methods for single-line and multi-line queries
41
+ if (target.length == 1)
42
+ this.matches = function(reverse, pos) {
43
+ var line = fold(cm.getLine(pos.line)), len = query.length, match;
44
+ if (reverse ? (pos.ch >= len && (match = line.lastIndexOf(query, pos.ch - len)) != -1)
45
+ : (match = line.indexOf(query, pos.ch)) != -1)
46
+ return {from: {line: pos.line, ch: match},
47
+ to: {line: pos.line, ch: match + len}};
48
+ };
49
+ else
50
+ this.matches = function(reverse, pos) {
51
+ var ln = pos.line, idx = (reverse ? target.length - 1 : 0), match = target[idx], line = fold(cm.getLine(ln));
52
+ var offsetA = (reverse ? line.indexOf(match) + match.length : line.lastIndexOf(match));
53
+ if (reverse ? offsetA >= pos.ch || offsetA != match.length
54
+ : offsetA <= pos.ch || offsetA != line.length - match.length)
55
+ return;
56
+ for (;;) {
57
+ if (reverse ? !ln : ln == cm.lineCount() - 1) return;
58
+ line = fold(cm.getLine(ln += reverse ? -1 : 1));
59
+ match = target[reverse ? --idx : ++idx];
60
+ if (idx > 0 && idx < target.length - 1) {
61
+ if (line != match) return;
62
+ else continue;
63
+ }
64
+ var offsetB = (reverse ? line.lastIndexOf(match) : line.indexOf(match) + match.length);
65
+ if (reverse ? offsetB != line.length - match.length : offsetB != match.length)
66
+ return;
67
+ var start = {line: pos.line, ch: offsetA}, end = {line: ln, ch: offsetB};
68
+ return {from: reverse ? end : start, to: reverse ? start : end};
69
+ }
70
+ };
71
+ }
72
+ }
73
+
74
+ SearchCursor.prototype = {
75
+ findNext: function() {return this.find(false);},
76
+ findPrevious: function() {return this.find(true);},
77
+
78
+ find: function(reverse) {
79
+ var self = this, pos = this.cm.clipPos(reverse ? this.pos.from : this.pos.to);
80
+ function savePosAndFail(line) {
81
+ var pos = {line: line, ch: 0};
82
+ self.pos = {from: pos, to: pos};
83
+ self.atOccurrence = false;
84
+ return false;
85
+ }
86
+
87
+ for (;;) {
88
+ if (this.pos = this.matches(reverse, pos)) {
89
+ this.atOccurrence = true;
90
+ return this.pos.match || true;
91
+ }
92
+ if (reverse) {
93
+ if (!pos.line) return savePosAndFail(0);
94
+ pos = {line: pos.line-1, ch: this.cm.getLine(pos.line-1).length};
95
+ }
96
+ else {
97
+ var maxLine = this.cm.lineCount();
98
+ if (pos.line == maxLine - 1) return savePosAndFail(maxLine);
99
+ pos = {line: pos.line+1, ch: 0};
100
+ }
101
+ }
102
+ },
103
+
104
+ from: function() {if (this.atOccurrence) return this.pos.from;},
105
+ to: function() {if (this.atOccurrence) return this.pos.to;},
106
+
107
+ replace: function(newText) {
108
+ var self = this;
109
+ if (this.atOccurrence)
110
+ self.pos.to = this.cm.replaceRange(newText, self.pos.from, self.pos.to);
111
+ }
112
+ };
113
+
114
+ CodeMirror.defineExtension("getSearchCursor", function(query, pos, caseFold) {
115
+ return new SearchCursor(this, query, pos, caseFold);
116
+ });
117
+ })();
@@ -0,0 +1,72 @@
1
+ (function() {
2
+ CodeMirror.simpleHint = function(editor, getHints) {
3
+ // We want a single cursor position.
4
+ if (editor.somethingSelected()) return;
5
+ var result = getHints(editor);
6
+ if (!result || !result.list.length) return;
7
+ var completions = result.list;
8
+ function insert(str) {
9
+ editor.replaceRange(str, result.from, result.to);
10
+ }
11
+ // When there is only one completion, use it directly.
12
+ if (completions.length == 1) {insert(completions[0]); return true;}
13
+
14
+ // Build the select widget
15
+ var complete = document.createElement("div");
16
+ complete.className = "CodeMirror-completions";
17
+ var sel = complete.appendChild(document.createElement("select"));
18
+ // Opera doesn't move the selection when pressing up/down in a
19
+ // multi-select, but it does properly support the size property on
20
+ // single-selects, so no multi-select is necessary.
21
+ if (!window.opera) sel.multiple = true;
22
+ for (var i = 0; i < completions.length; ++i) {
23
+ var opt = sel.appendChild(document.createElement("option"));
24
+ opt.appendChild(document.createTextNode(completions[i]));
25
+ }
26
+ sel.firstChild.selected = true;
27
+ sel.size = Math.min(10, completions.length);
28
+ var pos = editor.cursorCoords();
29
+ complete.style.left = pos.x + "px";
30
+ complete.style.top = pos.yBot + "px";
31
+ document.body.appendChild(complete);
32
+ // If we're at the edge of the screen, then we want the menu to appear on the left of the cursor.
33
+ var winW = window.innerWidth || Math.max(document.body.offsetWidth, document.documentElement.offsetWidth);
34
+ if(winW - pos.x < sel.clientWidth)
35
+ complete.style.left = (pos.x - sel.clientWidth) + "px";
36
+ // Hack to hide the scrollbar.
37
+ if (completions.length <= 10)
38
+ complete.style.width = (sel.clientWidth - 1) + "px";
39
+
40
+ var done = false;
41
+ function close() {
42
+ if (done) return;
43
+ done = true;
44
+ complete.parentNode.removeChild(complete);
45
+ }
46
+ function pick() {
47
+ insert(completions[sel.selectedIndex]);
48
+ close();
49
+ setTimeout(function(){editor.focus();}, 50);
50
+ }
51
+ CodeMirror.connect(sel, "blur", close);
52
+ CodeMirror.connect(sel, "keydown", function(event) {
53
+ var code = event.keyCode;
54
+ // Enter
55
+ if (code == 13) {CodeMirror.e_stop(event); pick();}
56
+ // Escape
57
+ else if (code == 27) {CodeMirror.e_stop(event); close(); editor.focus();}
58
+ else if (code != 38 && code != 40) {
59
+ close(); editor.focus();
60
+ // Pass the event to the CodeMirror instance so that it can handle things like backspace properly.
61
+ editor.triggerOnKeyDown(event);
62
+ setTimeout(function(){CodeMirror.simpleHint(editor, getHints);}, 50);
63
+ }
64
+ });
65
+ CodeMirror.connect(sel, "dblclick", pick);
66
+
67
+ sel.focus();
68
+ // Opera sometimes ignores focusing a freshly created node
69
+ if (window.opera) setTimeout(function(){if (!done) sel.focus();}, 100);
70
+ return true;
71
+ };
72
+ })();
@@ -1,14 +1,52 @@
1
1
  .CodeMirror {
2
2
  line-height: 1em;
3
3
  font-family: monospace;
4
+
5
+ /* Necessary so the scrollbar can be absolutely positioned within the wrapper on Lion. */
6
+ position: relative;
7
+ /* This prevents unwanted scrollbars from showing up on the body and wrapper in IE. */
8
+ overflow: hidden;
4
9
  }
5
10
 
6
11
  .CodeMirror-scroll {
7
- overflow: auto;
12
+ overflow-x: auto;
13
+ overflow-y: hidden;
8
14
  height: 300px;
9
15
  /* This is needed to prevent an IE[67] bug where the scrolled content
10
16
  is visible outside of the scrolling box. */
11
17
  position: relative;
18
+ outline: none;
19
+ }
20
+
21
+ /* Vertical scrollbar */
22
+ .CodeMirror-scrollbar {
23
+ float: right;
24
+ overflow-x: hidden;
25
+ overflow-y: scroll;
26
+
27
+ /* This corrects for the 1px gap introduced to the left of the scrollbar
28
+ by the rule for .CodeMirror-scrollbar-inner. */
29
+ margin-left: -1px;
30
+ }
31
+ .CodeMirror-scrollbar-inner {
32
+ /* This needs to have a nonzero width in order for the scrollbar to appear
33
+ in Firefox and IE9. */
34
+ width: 1px;
35
+ }
36
+ .CodeMirror-scrollbar.cm-sb-overlap {
37
+ /* Ensure that the scrollbar appears in Lion, and that it overlaps the content
38
+ rather than sitting to the right of it. */
39
+ position: absolute;
40
+ z-index: 1;
41
+ float: none;
42
+ right: 0;
43
+ min-width: 12px;
44
+ }
45
+ .CodeMirror-scrollbar.cm-sb-nonoverlap {
46
+ min-width: 12px;
47
+ }
48
+ .CodeMirror-scrollbar.cm-sb-ie7 {
49
+ min-width: 18px;
12
50
  }
13
51
 
14
52
  .CodeMirror-gutter {
@@ -27,6 +65,12 @@
27
65
  }
28
66
  .CodeMirror-lines {
29
67
  padding: .4em;
68
+ white-space: pre;
69
+ cursor: text;
70
+ }
71
+ .CodeMirror-lines * {
72
+ /* Necessary for throw-scrolling to decelerate properly on Safari. */
73
+ pointer-events: none;
30
74
  }
31
75
 
32
76
  .CodeMirror pre {
@@ -40,11 +84,14 @@
40
84
  padding: 0; margin: 0;
41
85
  white-space: pre;
42
86
  word-wrap: normal;
87
+ line-height: inherit;
88
+ color: inherit;
43
89
  }
44
90
 
45
91
  .CodeMirror-wrap pre {
46
92
  word-wrap: break-word;
47
93
  white-space: pre-wrap;
94
+ word-break: normal;
48
95
  }
49
96
  .CodeMirror-wrap .CodeMirror-scroll {
50
97
  overflow-x: hidden;
@@ -59,15 +106,32 @@
59
106
  position: absolute;
60
107
  visibility: hidden;
61
108
  border-left: 1px solid black;
109
+ border-right: none;
110
+ width: 0;
111
+ }
112
+ .cm-keymap-fat-cursor pre.CodeMirror-cursor {
113
+ width: auto;
114
+ border: 0;
115
+ background: transparent;
116
+ background: rgba(0, 200, 0, .4);
117
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);
62
118
  }
119
+ /* Kludge to turn off filter in ie9+, which also accepts rgba */
120
+ .cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) {
121
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
122
+ }
123
+ .CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {}
63
124
  .CodeMirror-focused pre.CodeMirror-cursor {
64
125
  visibility: visible;
65
126
  }
66
127
 
67
- span.CodeMirror-selected { background: #d9d9d9; }
68
- .CodeMirror-focused span.CodeMirror-selected { background: #d2dcf8; }
128
+ div.CodeMirror-selected { background: #d9d9d9; }
129
+ .CodeMirror-focused div.CodeMirror-selected { background: #d7d4f0; }
69
130
 
70
- .CodeMirror-searching {background: #ffa;}
131
+ .CodeMirror-searching {
132
+ background: #ffa;
133
+ background: rgba(255, 255, 0, .4);
134
+ }
71
135
 
72
136
  /* Default theme */
73
137
 
@@ -90,7 +154,7 @@ span.CodeMirror-selected { background: #d9d9d9; }
90
154
  .cm-s-default span.cm-bracket {color: #cc7;}
91
155
  .cm-s-default span.cm-tag {color: #170;}
92
156
  .cm-s-default span.cm-attribute {color: #00c;}
93
- .cm-s-default span.cm-header {color: #a0a;}
157
+ .cm-s-default span.cm-header {color: blue;}
94
158
  .cm-s-default span.cm-quote {color: #090;}
95
159
  .cm-s-default span.cm-hr {color: #999;}
96
160
  .cm-s-default span.cm-link {color: #00c;}
@@ -1,21 +1,14 @@
1
- .cm-s-default span.cm-header {color: blue; font-weight:bold;}
2
- .cm-s-default span.cm-code {color: #a50;}
3
- .cm-s-default span.cm-code-inline {color: #660;}
4
-
5
- .cm-s-default span.cm-quote {color: #555;}
6
- .cm-s-default span.cm-list {color: #c60;}
7
- .cm-s-default span.cm-hr {color: #999;}
8
- .cm-s-default span.cm-em {font-style: italic;}
9
- .cm-s-default span.cm-strong {font-weight: bold;}
10
-
11
- .cm-s-default span.cm-link-external {color: blue;}
12
- .cm-s-default span.cm-brace {color: #170; font-weight: bold;}
13
- .cm-s-default span.cm-macro {color: #9E3825;}
14
- .cm-s-default span.cm-table {color: blue;}
15
- .cm-s-default span.cm-warning {color: red; font-weight: bold;}
16
-
17
- .cm-s-default span.cm-underlined {text-decoration: underline;}
18
- .cm-s-default span.cm-line-through {text-decoration: line-through;}
19
-
20
- .cm-s-default span.cm-comment {color: #666;}
21
-
1
+ span.cm-underlined {
2
+ text-decoration: underline;
3
+ }
4
+ span.cm-strikethrough {
5
+ text-decoration: line-through;
6
+ }
7
+ span.cm-brace {
8
+ color: #170;
9
+ font-weight: bold;
10
+ }
11
+ span.cm-table {
12
+ color: blue;
13
+ font-weight: bold;
14
+ }