22 changes: 19 additions & 3 deletions demo/theme.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@
<link rel="stylesheet" href="../theme/blackboard.css">
<link rel="stylesheet" href="../theme/cobalt.css">
<link rel="stylesheet" href="../theme/colorforth.css">
<link rel="stylesheet" href="../theme/dracula.css">
<link rel="stylesheet" href="../theme/eclipse.css">
<link rel="stylesheet" href="../theme/elegant.css">
<link rel="stylesheet" href="../theme/erlang-dark.css">
<link rel="stylesheet" href="../theme/icecoder.css">
<link rel="stylesheet" href="../theme/lesser-dark.css">
<link rel="stylesheet" href="../theme/liquibyte.css">
<link rel="stylesheet" href="../theme/material.css">
<link rel="stylesheet" href="../theme/mbo.css">
<link rel="stylesheet" href="../theme/mdn-like.css">
<link rel="stylesheet" href="../theme/midnight.css">
Expand All @@ -29,6 +32,7 @@
<link rel="stylesheet" href="../theme/paraiso-light.css">
<link rel="stylesheet" href="../theme/pastel-on-dark.css">
<link rel="stylesheet" href="../theme/rubyblue.css">
<link rel="stylesheet" href="../theme/seti.css">
<link rel="stylesheet" href="../theme/solarized.css">
<link rel="stylesheet" href="../theme/the-matrix.css">
<link rel="stylesheet" href="../theme/tomorrow-night-bright.css">
Expand All @@ -38,6 +42,7 @@
<link rel="stylesheet" href="../theme/vibrant-ink.css">
<link rel="stylesheet" href="../theme/xq-dark.css">
<link rel="stylesheet" href="../theme/xq-light.css">
<link rel="stylesheet" href="../theme/yeti.css">
<link rel="stylesheet" href="../theme/zenburn.css">
<script src="../lib/codemirror.js"></script>
<script src="../mode/javascript/javascript.js"></script>
Expand Down Expand Up @@ -85,11 +90,14 @@ <h2>Theme Demo</h2>
<option>blackboard</option>
<option>cobalt</option>
<option>colorforth</option>
<option>dracula</option>
<option>eclipse</option>
<option>elegant</option>
<option>erlang-dark</option>
<option>icecoder</option>
<option>lesser-dark</option>
<option>liquibyte</option>
<option>material</option>
<option>mbo</option>
<option>mdn-like</option>
<option>midnight</option>
Expand All @@ -101,6 +109,7 @@ <h2>Theme Demo</h2>
<option>paraiso-light</option>
<option>pastel-on-dark</option>
<option>rubyblue</option>
<option>seti</option>
<option>solarized dark</option>
<option>solarized light</option>
<option>the-matrix</option>
Expand All @@ -111,6 +120,7 @@ <h2>Theme Demo</h2>
<option>vibrant-ink</option>
<option>xq-dark</option>
<option>xq-light</option>
<option>yeti</option>
<option>zenburn</option>
</select>
</p>
Expand All @@ -123,14 +133,20 @@ <h2>Theme Demo</h2>
});
var input = document.getElementById("select");
function selectTheme() {
var theme = input.options[input.selectedIndex].innerHTML;
var theme = input.options[input.selectedIndex].textContent;
editor.setOption("theme", theme);
location.hash = "#" + theme;
}
var choice = document.location.search &&
decodeURIComponent(document.location.search.slice(1));
var choice = (location.hash && location.hash.slice(1)) ||
(document.location.search &&
decodeURIComponent(document.location.search.slice(1)));
if (choice) {
input.value = choice;
editor.setOption("theme", choice);
}
CodeMirror.on(window, "hashchange", function() {
var theme = location.hash.slice(1);
if (theme) { input.value = theme; selectTheme(); }
});
</script>
</article>
3 changes: 3 additions & 0 deletions doc/compress.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ <h2>Script compression helper</h2>
<input type="hidden" id="download" name="download" value="codemirror-compressed.js"/>
<p>Version: <select id="version" onchange="setVersion(this);" style="padding: 1px;">
<option value="http://codemirror.net/">HEAD</option>
<option value="http://marijnhaverbeke.nl/git/codemirror?a=blob_plain;hb=5.5.0;f=">5.5</option>
<option value="http://marijnhaverbeke.nl/git/codemirror?a=blob_plain;hb=5.4.0;f=">5.4</option>
<option value="http://marijnhaverbeke.nl/git/codemirror?a=blob_plain;hb=5.3.0;f=">5.3</option>
<option value="http://marijnhaverbeke.nl/git/codemirror?a=blob_plain;hb=5.2.0;f=">5.2</option>
Expand Down Expand Up @@ -110,6 +111,7 @@ <h2>Script compression helper</h2>
<option value="http://codemirror.net/mode/asn.1/asn.1.js">asn.1.js</option>
<option value="http://codemirror.net/mode/asterisk/asterisk.js">asterisk.js</option>
<option value="http://codemirror.net/mode/asciiarmor/asciiarmor.js">asciiarmor.js</option>
<option value="http://codemirror.net/mode/brainfuck/brainfuck.js">brainfuck.js</option>
<option value="http://codemirror.net/mode/clike/clike.js">clike.js</option>
<option value="http://codemirror.net/mode/clojure/clojure.js">clojure.js</option>
<option value="http://codemirror.net/mode/cmake/cmake.js">cmake.js</option>
Expand Down Expand Up @@ -207,6 +209,7 @@ <h2>Script compression helper</h2>
<option value="http://codemirror.net/mode/vbscript/vbscript.js">vbscript.js</option>
<option value="http://codemirror.net/mode/velocity/velocity.js">velocity.js</option>
<option value="http://codemirror.net/mode/verilog/verilog.js">verilog.js</option>
<option value="http://codemirror.net/mode/vhdl/vhdl.js">vhdl.js</option>
<option value="http://codemirror.net/mode/xml/xml.js">xml.js</option>
<option value="http://codemirror.net/mode/xquery/xquery.js">xquery.js</option>
<option value="http://codemirror.net/mode/yaml/yaml.js">yaml.js</option>
Expand Down
30 changes: 26 additions & 4 deletions doc/manual.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<section class=first id=overview>
<h2 style="position: relative">
User manual and reference guide
<span style="color: #888; font-size: 1rem; position: absolute; right: 0; bottom: 0">version 5.4.0</span>
<span style="color: #888; font-size: 1rem; position: absolute; right: 0; bottom: 0">version 5.5.0</span>
</h2>

<p>CodeMirror is a code-editor component that can be embedded in
Expand Down Expand Up @@ -236,6 +236,16 @@ <h2>Configuration</h2>
mode names to their constructors, and the second maps MIME types
to mode specs.</dd>

<dt id="option_lineSeparator"><code><strong>lineSeparator</strong>: string|null</code></dt>
<dd>Explicitly set the line separator for the editor. By default
(value <code>null</code>), the document will be split on CRLFs
as well as lone CRs and LFs, and a single LF will be used as
line separator in all output (such
as <a href="#getValue"><code>getValue</code></a>). When a
specific string is given, lines will only be split on that
string, and output will, by default, use that same
separator.</dd>

<dt id="option_theme"><code><strong>theme</strong>: string</code></dt>
<dd>The theme to style the editor with. You must make sure the
CSS file defining the corresponding <code>.cm-s-[name]</code>
Expand Down Expand Up @@ -510,13 +520,17 @@ <h2>Events</h2>
an array of strings representing the text that replaced the
changed range (split by line). <code>removed</code> is the text
that used to be between <code>from</code> and <code>to</code>,
which is overwritten by this change.</dd>
which is overwritten by this change. This event is
fired <em>before</em> the end of
an <a href="#operation">operation</a>, before the DOM updates
happen.</dd>

<dt id="event_changes"><code><strong>"changes"</strong> (instance: CodeMirror, changes: array&lt;object&gt;)</code></dt>
<dd>Like the <a href="#event_change"><code>"change"</code></a>
event, but batched per <a href="#operation">operation</a>,
passing an array containing all the changes that happened in the
operation.</dd>
operation. This event is fired after the operation finished, and
display changes it makes will trigger a new operation.</dd>

<dt id="event_beforeChange"><code><strong>"beforeChange"</strong> (instance: CodeMirror, changeObj: object)</code></dt>
<dd>This event is fired before a change is applied, and its
Expand Down Expand Up @@ -1983,6 +1997,12 @@ <h3 id="api_misc">Miscellaneous methods</h3>
given an argument), or sets the overwrite mode to a specific
state (when given an argument).</dd>

<dt id="lineSeparator"><code><strong>doc.lineSeparator</strong>()</code></dt>
<dd>Returns the preferred line separator string for this
document, as per the <a href="#option_lineSeparator">option</a>
by the same name. When that option is <code>null</code>, the
string <code>"\n"</code> is returned.</dd>

<dt id="execCommand"><code><strong>cm.execCommand</strong>(name: string)</code></dt>
<dd>Runs the <a href="#commands">command</a> with the given name on the editor.</dd>

Expand Down Expand Up @@ -2481,7 +2501,9 @@ <h2 id="addons">Addons</h2>
is an array of strings or objects (the completions),
and <code>from</code> and <code>to</code> give the start and end
of the token that is being completed as <code>{line, ch}</code>
objects.</dd>
objects. An optional <code>selectedHint</code> property (an
integer) can be added to the completion object to control the
initially selected hint.</dd>
<dd>If no hinting function is given, the addon will
use <code>CodeMirror.hint.auto</code>, which
calls <a href="#getHelpers"><code>getHelpers</code></a> with
Expand Down
39 changes: 26 additions & 13 deletions doc/releases.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@ <h2>Release notes and version history</h2>

<h2>Version 5.x</h2>

<p class="rel">20-07-2015: <a href="http://codemirror.net/codemirror-5.5.zip">Version 5.5</a>:</p>

<ul class="rel-note">
<li>New option: <a href="manual.html#option_lineSeparator"><code>lineSeparator</code></a> (with corresponding <a href="manual.html#lineSeparator">method</a>)
<li>New themes: <a href="../demo/theme.html#dracula">dracula</a>, <a href="../demo/theme.html#seti">seti</a>, <a href="../demo/theme.html#yeti">yeti</a>, <a href="../demo/theme.html#material">material</a>, and <a href="../demo/theme.html#icecoder">icecoder</a></li>
<li>New modes: <a href="../mode/brainfuck/index.html">Brainfuck</a>, <a href="../mode/vhdl/index.html">VHDL</a>, Squirrel (<a href="../mode/clike/index.html">clike</a> dialect)</li>
<li>Define a <code>findPersistent</code> command in
the <a href="../demo/search.html">search</a> addon, for a dialog
that stays open as you cycle through matches</li>
<li>From this release on, the NPM module doesn't include documentation and demos</li>
<li>Full <a href="https://github.com/codemirror/CodeMirror/compare/5.4.0...5.5.0">list of patches</a></li>
</ul>

<p class="rel">25-06-2015: <a href="http://codemirror.net/codemirror-5.4.zip">Version 5.4</a>:</p>

<ul class="rel-note">
Expand Down Expand Up @@ -60,7 +73,7 @@ <h2>Version 5.x</h2>

<li>New modes: <a href="../mode/mumps/index.html">MUMPS</a>, <a href="../mode/handlebars/index.html">Handlebars</a></li>
<li>Rewritten modes: <a href="../mode/django/index.html">Django</a>, <a href="../mode/z80/index.html">Z80</a></li>
<li>New theme: <a href="../demo/theme.html?liquibyte">Liquibyte</a></li>
<li>New theme: <a href="../demo/theme.html#liquibyte">Liquibyte</a></li>
<li>New option: <a href="manual.html#option_lineWiseCopyCut"><code>lineWiseCopyCut</code></a></li>
<li>The <a href="../demo/vim.html">Vim mode</a> now supports buffer-local options and the <code>filetype</code> setting</li>
<li>Full <a href="https://github.com/codemirror/CodeMirror/compare/5.1.0...5.2.0">list of patches</a></li>
Expand Down Expand Up @@ -151,8 +164,8 @@ <h2>Version 4.x</h2>
modes: <a href="../mode/dart/index.html">Dart</a>, <a href="../mode/ebnf/index.html">EBNF</a>, <a href="../mode/spreadsheet/index.html">spreadsheet</a>,
and <a href="../mode/soy/index.html">Soy</a>.</li>
<li>New <a href="../demo/panel.html">addon</a> to show persistent panels below/above an editor.</li>
<li>New themes: <a href="../demo/theme.html?zenburn">zenburn</a>
and <a href="../demo/theme.html?tomorrow-night-bright">tomorrow night
<li>New themes: <a href="../demo/theme.html#zenburn">zenburn</a>
and <a href="../demo/theme.html#tomorrow-night-bright">tomorrow night
bright</a>.</li>
<li>Allow ctrl-click to clear existing cursors.</li>
<li>Full <a href="https://github.com/codemirror/CodeMirror/compare/4.8.0...4.9.0">list of patches</a>.</li>
Expand Down Expand Up @@ -256,7 +269,7 @@ <h2>Version 4.x</h2>
<li>Rewritten <a href="../mode/jade/index.html">Jade</a> mode.</li>
<li>Various improvements to <a href="../mode/shell/index.html">Shell</a> (support for more syntax) and <a href="../mode/python/index.html">Python</a> (better indentation) modes.</li>
<li>New mode: <a href="../mode/cypher/index.html">Cypher</a>.</li>
<li>New theme: <a href="../demo/theme.html?neo">Neo</a>.</li>
<li>New theme: <a href="../demo/theme.html#neo">Neo</a>.</li>
<li>Support direct styling options (color, line style, width) in the <a href="manual.html#addon_rulers">rulers</a> addon.</li>
<li>Recognize per-editor configuration for the <a href="manual.html#addon_show-hint">show-hint</a> and <a href="manual.html#addon_foldcode">foldcode</a> addons.</li>
<li>More intelligent scanning for existing close tags in <a href="manual.html#addon_closetag">closetag</a> addon.</li>
Expand Down Expand Up @@ -322,7 +335,7 @@ <h2>Version 3.x</h2>
<ul class="rel-note">
<li>Adds the <a href="manual.html#findMarks"><code>findMarks</code></a> method.</li>
<li>New addons: <a href="manual.html#addon_rulers">rulers</a>, markdown-fold, yaml-lint.</li>
<li>New theme: <a href="../demo/theme.html?mdn-like">mdn-like</a>.</li>
<li>New theme: <a href="../demo/theme.html#mdn-like">mdn-like</a>.</li>
<li>New mode: <a href="../mode/solr/index.html">Solr</a>.</li>
<li>Full <a href="https://github.com/codemirror/CodeMirror/compare/3.21.0...3.22.0">list of patches</a>.</li>
</ul>
Expand All @@ -336,7 +349,7 @@ <h2>Version 3.x</h2>
<li>The <a href="../mode/xml/index.html">XML</a> and <a href="../mode/css/index.html">CSS</a> modes were largely rewritten. <a href="../mode/css/less.html">LESS</a> support was added to the CSS mode.</li>
<li>The OCaml mode was moved to an <a href="../mode/mllike/index.html">mllike</a> mode, F# support added.</li>
<li>Make it possible to fetch multiple applicable helper values with <a href="manual.html#getHelpers"><code>getHelpers</code></a>, and to register helpers matched on predicates with <a href="manual.html#registerGlobalHelper"><code>registerGlobalHelper</code></a>.</li>
<li>New theme <a href="../demo/theme.html?pastel-on-dark">pastel-on-dark</a>.</li>
<li>New theme <a href="../demo/theme.html#pastel-on-dark">pastel-on-dark</a>.</li>
<li>Better ECMAScript 6 support in <a href="../mode/javascript/index.html">JavaScript</a> mode.</li>
<li>Full <a href="https://github.com/codemirror/CodeMirror/compare/3.20.0...3.21.0">list of patches</a>.</li>
</ul>
Expand All @@ -357,7 +370,7 @@ <h2>Version 3.x</h2>
<ul class="rel-note">
<li>New modes: <a href="../mode/eiffel/index.html">Eiffel</a>, <a href="../mode/gherkin/index.html">Gherkin</a>, <a href="../mode/sql/?mime=text/x-mssql">MSSQL dialect</a>.</li>
<li>New addons: <a href="manual.html#addon_hardwrap">hardwrap</a>, <a href="manual.html#addon_sql-hint">sql-hint</a>.</li>
<li>New theme: <a href="../demo/theme.html?mbo">MBO</a>.</li>
<li>New theme: <a href="../demo/theme.html#mbo">MBO</a>.</li>
<li>Add <a href="manual.html#token_style_line">support</a> for line-level styling from mode tokenizers.</li>
<li>Full <a href="https://github.com/codemirror/CodeMirror/compare/3.18.0...3.19.0">list of patches</a>.</li>
</ul>
Expand All @@ -382,7 +395,7 @@ <h2>Version 3.x</h2>
<ul class="rel-note">
<li>The whole codebase is now under a single <a href="../LICENSE">license</a> file.</li>
<li>The project page was overhauled and redesigned.</li>
<li>New themes: <a href="../demo/theme.html?paraiso-dark">Paraiso</a> (<a href="../demo/theme.html?paraiso-light">light</a>), <a href="../demo/theme.html?the-matrix">The Matrix</a>.</li>
<li>New themes: <a href="../demo/theme.html#paraiso-dark">Paraiso</a> (<a href="../demo/theme.html#paraiso-light">light</a>), <a href="../demo/theme.html#the-matrix">The Matrix</a>.</li>
<li>Improved interaction between themes and <a href="manual.html#addon_active-line">active-line</a>/<a href="manual.html#addon_matchbrackets">matchbrackets</a> addons.</li>
<li>New <a href="manual.html#addon_foldcode">folding</a> function <code>CodeMirror.fold.comment</code>.</li>
<li>Added <a href="manual.html#addon_fullscreen">fullscreen</a> addon.</li>
Expand All @@ -396,7 +409,7 @@ <h2>Version 3.x</h2>
<li>New addons: <a href="../demo/tern.html">Tern</a>, <a href="manual.html#addon_matchtags">matchtags</a>, and <a href="manual.html#addon_foldgutter">foldgutter</a>.</li>
<li>Introduced <a href="manual.html#getHelper"><em>helper</em></a> concept (<a href="https://groups.google.com/forum/#!msg/codemirror/cOc0xvUUEUU/nLrX1-qnidgJ">context</a>).</li>
<li>New method: <a href="manual.html#getModeAt"><code>getModeAt</code></a>.</li>
<li>New themes: base16 <a href="../demo/theme.html?base16-dark">dark</a>/<a href="../demo/theme.html?base16-light">light</a>, 3024 <a href="../demo/theme.html?3024-night">dark</a>/<a href="../demo/theme.html?3024-day">light</a>, <a href="../demo/theme.html?tomorrow-night-eighties">tomorrow-night</a>.</li>
<li>New themes: base16 <a href="../demo/theme.html#base16-dark">dark</a>/<a href="../demo/theme.html#base16-light">light</a>, 3024 <a href="../demo/theme.html#3024-night">dark</a>/<a href="../demo/theme.html#3024-day">light</a>, <a href="../demo/theme.html#tomorrow-night-eighties">tomorrow-night</a>.</li>
<li>Full <a href="https://github.com/codemirror/CodeMirror/compare/3.14.0...3.15.0">list of patches</a>.</li>
</ul>

Expand Down Expand Up @@ -567,7 +580,7 @@ <h2>Version 3.x</h2>
<p class="rel">20-11-2012: <a href="http://codemirror.net/codemirror-3.0rc1.zip">Version 3.0, release candidate 1</a>:</p>

<ul class="rel-note">
<li>New theme: <a href="../demo/theme.html?solarized%20light">Solarized</a>.</li>
<li>New theme: <a href="../demo/theme.html#solarized%20light">Solarized</a>.</li>
<li>Introduce <a href="manual.html#addLineClass"><code>addLineClass</code></a>
and <a href="manual.html#removeLineClass"><code>removeLineClass</code></a>,
drop <code>setLineClass</code>.</li>
Expand Down Expand Up @@ -633,7 +646,7 @@ <h2>Version 2.x</h2>

<ul class="rel-note">
<li>New mode: <a href="../mode/z80/index.html">Z80 assembly</a>.</li>
<li>New theme: <a href="../demo/theme.html?twilight">Twilight</a>.</li>
<li>New theme: <a href="../demo/theme.html#twilight">Twilight</a>.</li>
<li>Add command-line compression helper.</li>
<li>Make <a href="manual.html#scrollIntoView"><code>scrollIntoView</code></a> public.</li>
<li>Add <a href="manual.html#defaultTextHeight"><code>defaultTextHeight</code></a> method.</li>
Expand Down Expand Up @@ -703,7 +716,7 @@ <h2>Version 2.x</h2>

<ul class="rel-note">
<li><strong>New scrollbar implementation</strong>. Should flicker less. Changes DOM structure of the editor.</li>
<li>New theme: <a href="../demo/theme.html?vibrant-ink">vibrant-ink</a>.</li>
<li>New theme: <a href="../demo/theme.html#vibrant-ink">vibrant-ink</a>.</li>
<li>Many extensions to the VIM keymap (including text objects).</li>
<li>Add <a href="../demo/multiplex.html">mode-multiplexing</a> utility script.</li>
<li>Fix bug where right-click paste works in read-only mode.</li>
Expand All @@ -729,7 +742,7 @@ <h2>Version 2.x</h2>
<li>New
modes: <a href="../mode/shell/index.html">Shell</a>, <a href="../mode/tiki/index.html">Tiki
wiki</a>, <a href="../mode/pig/index.html">Pig Latin</a>.</li>
<li>New themes: <a href="../demo/theme.html?ambiance">Ambiance</a>, <a href="../demo/theme.html?blackboard">Blackboard</a>.</li>
<li>New themes: <a href="../demo/theme.html#ambiance">Ambiance</a>, <a href="../demo/theme.html#blackboard">Blackboard</a>.</li>
<li>More control over drag/drop
with <a href="manual.html#option_dragDrop"><code>dragDrop</code></a>
and <a href="manual.html#option_onDragEvent"><code>onDragEvent</code></a>
Expand Down
7 changes: 5 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ <h2>This is CodeMirror</h2>
</div>
</div>
<div class=actionsleft>
Get the current version: <a href="http://codemirror.net/codemirror.zip">5.4</a>.<br>
Get the current version: <a href="http://codemirror.net/codemirror.zip">5.5</a>.<br>
You can see the <a href="https://github.com/codemirror/codemirror" title="Github repository">code</a> or<br>
read the <a href="doc/releases.html">release notes</a>.<br>
There is a <a href="doc/compress.html">minification helper</a>.
Expand Down Expand Up @@ -168,7 +168,10 @@ <h2>Community</h2>
list, which is only used for major announcements (such as new
versions). If needed, you can
contact <a href="mailto:marijnh@gmail.com">the maintainer</a>
directly.</p>
directly. We aim to be an inclusive, welcoming community. To make
that explicit, we have
a <a href="http://contributor-covenant.org/version/1/1/0/">code of
conduct</a> that applies to communication around the project.</p>

<p>A list of CodeMirror-related software that is not part of the
main distribution is maintained
Expand Down
2 changes: 1 addition & 1 deletion keymap/emacs.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@

getInput(cm, "Goto line", function(str) {
var num;
if (str && !isNaN(num = Number(str)) && num == num|0 && num > 0)
if (str && !isNaN(num = Number(str)) && num == (num|0) && num > 0)
cm.setCursor(num - 1);
});
},
Expand Down
6 changes: 4 additions & 2 deletions keymap/sublime.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
cmds[map["Alt-Left"] = "goSubwordLeft"] = function(cm) { moveSubword(cm, -1); };
cmds[map["Alt-Right"] = "goSubwordRight"] = function(cm) { moveSubword(cm, 1); };

cmds[map[ctrl + "Up"] = "scrollLineUp"] = function(cm) {
var scrollLineCombo = mac ? "Ctrl-Alt-" : "Ctrl-";

cmds[map[scrollLineCombo + "Up"] = "scrollLineUp"] = function(cm) {
var info = cm.getScrollInfo();
if (!cm.somethingSelected()) {
var visibleBottomLine = cm.lineAtHeight(info.top + info.clientHeight, "local");
Expand All @@ -64,7 +66,7 @@
}
cm.scrollTo(null, info.top - cm.defaultTextHeight());
};
cmds[map[ctrl + "Down"] = "scrollLineDown"] = function(cm) {
cmds[map[scrollLineCombo + "Down"] = "scrollLineDown"] = function(cm) {
var info = cm.getScrollInfo();
if (!cm.somethingSelected()) {
var visibleTopLine = cm.lineAtHeight(info.top, "local")+1;
Expand Down
2 changes: 1 addition & 1 deletion keymap/vim.js
Original file line number Diff line number Diff line change
Expand Up @@ -4308,7 +4308,7 @@
if (decimal + hex + octal > 1) { return 'Invalid arguments'; }
number = decimal && 'decimal' || hex && 'hex' || octal && 'octal';
}
if (args.eatSpace() && args.match(/\/.*\//)) { 'patterns not supported'; }
if (args.match(/\/.*\//)) { return 'patterns not supported'; }
}
}
var err = parseArgs();
Expand Down
31 changes: 19 additions & 12 deletions lib/codemirror.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,22 @@
-webkit-animation: blink 1.06s steps(1) infinite;
-moz-animation: blink 1.06s steps(1) infinite;
animation: blink 1.06s steps(1) infinite;
background-color: #7e7;
}
@-moz-keyframes blink {
0% { background: #7e7; }
50% { background: none; }
100% { background: #7e7; }
0% {}
50% { background-color: transparent; }
100% {}
}
@-webkit-keyframes blink {
0% { background: #7e7; }
50% { background: none; }
100% { background: #7e7; }
0% {}
50% { background-color: transparent; }
100% {}
}
@keyframes blink {
0% { background: #7e7; }
50% { background: none; }
100% { background: #7e7; }
0% {}
50% { background-color: transparent; }
100% {}
}

/* Can style cursor different in overwrite (non-insert) mode */
Expand Down Expand Up @@ -202,7 +203,13 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror-gutter-wrapper {
position: absolute;
z-index: 4;
height: 100%;
background: none !important;
border: none !important;
}
.CodeMirror-gutter-background {
position: absolute;
top: 0; bottom: 0;
z-index: 4;
}
.CodeMirror-gutter-elt {
position: absolute;
Expand Down Expand Up @@ -297,8 +304,8 @@ div.CodeMirror-cursors {
.CodeMirror-selected { background: #d9d9d9; }
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
.CodeMirror-crosshair { cursor: crosshair; }
.CodeMirror ::selection { background: #d7d4f0; }
.CodeMirror ::-moz-selection { background: #d7d4f0; }
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }

.cm-searching {
background: #ffa;
Expand Down
123 changes: 88 additions & 35 deletions lib/codemirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
setGuttersForLineNumbers(options);

var doc = options.value;
if (typeof doc == "string") doc = new Doc(doc, options.mode);
if (typeof doc == "string") doc = new Doc(doc, options.mode, null, options.lineSeparator);
this.doc = doc;

var input = new CodeMirror.inputStyles[options.inputStyle](this);
Expand Down Expand Up @@ -714,7 +714,7 @@
// width and height.
removeChildren(display.cursorDiv);
removeChildren(display.selectionDiv);
display.gutters.style.height = 0;
display.gutters.style.height = display.sizer.style.minHeight = 0;

if (different) {
display.lastWrapHeight = update.wrapperHeight;
Expand Down Expand Up @@ -955,12 +955,22 @@
lineView.node.removeChild(lineView.gutter);
lineView.gutter = null;
}
if (lineView.gutterBackground) {
lineView.node.removeChild(lineView.gutterBackground);
lineView.gutterBackground = null;
}
if (lineView.line.gutterClass) {
var wrap = ensureLineWrapped(lineView);
lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass,
"left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) +
"px; width: " + dims.gutterTotalWidth + "px");
wrap.insertBefore(lineView.gutterBackground, lineView.text);
}
var markers = lineView.line.gutterMarkers;
if (cm.options.lineNumbers || markers) {
var wrap = ensureLineWrapped(lineView);
var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", "left: " +
(cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) +
"px; width: " + dims.gutterTotalWidth + "px");
(cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px");
cm.display.input.setUneditable(gutterWrap);
wrap.insertBefore(gutterWrap, lineView.text);
if (lineView.line.gutterClass)
Expand Down Expand Up @@ -1082,13 +1092,18 @@
if (!sel) sel = doc.sel;

var paste = cm.state.pasteIncoming || origin == "paste";
var textLines = splitLines(inserted), multiPaste = null;
var textLines = doc.splitLines(inserted), multiPaste = null;
// When pasing N lines into N selections, insert one line per selection
if (paste && sel.ranges.length > 1) {
if (lastCopied && lastCopied.join("\n") == inserted)
multiPaste = sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines);
else if (textLines.length == sel.ranges.length)
if (lastCopied && lastCopied.join("\n") == inserted) {
if (sel.ranges.length % lastCopied.length == 0) {
multiPaste = [];
for (var i = 0; i < lastCopied.length; i++)
multiPaste.push(doc.splitLines(lastCopied[i]));
}
} else if (textLines.length == sel.ranges.length) {
multiPaste = map(textLines, function(l) { return [l]; });
}
}

// Normal behavior is to insert the new text into every selection
Expand Down Expand Up @@ -1388,7 +1403,7 @@
// will be the case when there is a lot of text in the textarea,
// in which case reading its value would be expensive.
if (this.contextMenuPending || !cm.state.focused ||
(hasSelection(input) && !prevInput) ||
(hasSelection(input) && !prevInput && !this.composing) ||
isReadOnly(cm) || cm.options.disableInput || cm.state.keySeq)
return false;

Expand Down Expand Up @@ -1756,7 +1771,7 @@
var toNode = display.view[toIndex + 1].node.previousSibling;
}

var newText = splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));
while (newText.length > 1 && oldText.length > 1) {
if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }
Expand Down Expand Up @@ -1912,7 +1927,7 @@
}

function domTextBetween(cm, from, to, fromLine, toLine) {
var text = "", closing = false;
var text = "", closing = false, lineSep = cm.doc.lineSeparator();
function recognizeMarker(id) { return function(marker) { return marker.id == id; }; }
function walk(node) {
if (node.nodeType == 1) {
Expand All @@ -1926,7 +1941,7 @@
if (markerID) {
var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));
if (found.length && (range = found[0].find()))
text += getBetween(cm.doc, range.from, range.to).join("\n");
text += getBetween(cm.doc, range.from, range.to).join(lineSep);
return;
}
if (node.getAttribute("contenteditable") == "false") return;
Expand All @@ -1938,7 +1953,7 @@
var val = node.nodeValue;
if (!val) return;
if (closing) {
text += "\n";
text += lineSep;
closing = false;
}
text += val;
Expand Down Expand Up @@ -2545,10 +2560,12 @@
function prepareMeasureForLine(cm, line) {
var lineN = lineNo(line);
var view = findViewForLine(cm, lineN);
if (view && !view.text)
if (view && !view.text) {
view = null;
else if (view && view.changes)
} else if (view && view.changes) {
updateLineForChanges(cm, view, lineN, getDimensions(cm));
cm.curOp.forceUpdate = true;
}
if (!view)
view = updateExternalMeasurement(cm, line);

Expand Down Expand Up @@ -3785,7 +3802,9 @@
text[i] = reader.result;
if (++read == n) {
pos = clipPos(cm.doc, pos);
var change = {from: pos, to: pos, text: splitLines(text.join("\n")), origin: "paste"};
var change = {from: pos, to: pos,
text: cm.doc.splitLines(text.join(cm.doc.lineSeparator())),
origin: "paste"};
makeChange(cm.doc, change);
setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change)));
}
Expand Down Expand Up @@ -4468,7 +4487,7 @@
function replaceRange(doc, code, from, to, origin) {
if (!to) to = from;
if (cmp(to, from) < 0) { var tmp = to; to = from; from = tmp; }
if (typeof code == "string") code = splitLines(code);
if (typeof code == "string") code = doc.splitLines(code);
makeChange(doc, {from: from, to: to, text: code, origin: origin});
}

Expand Down Expand Up @@ -5263,6 +5282,22 @@
clearCaches(cm);
regChange(cm);
}, true);
option("lineSeparator", null, function(cm, val) {
cm.doc.lineSep = val;
if (!val) return;
var newBreaks = [], lineNo = cm.doc.first;
cm.doc.iter(function(line) {
for (var pos = 0;;) {
var found = line.text.indexOf(val, pos);
if (found == -1) break;
pos = found + val.length;
newBreaks.push(Pos(lineNo, found));
}
lineNo++;
});
for (var i = newBreaks.length - 1; i >= 0; i--)
replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length))
});
option("specialChars", /[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g, function(cm, val, old) {
cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
if (old != CodeMirror.Init) cm.refresh();
Expand Down Expand Up @@ -5613,7 +5648,8 @@
} else if (cur.line > cm.doc.first) {
var prev = getLine(cm.doc, cur.line - 1).text;
if (prev)
cm.replaceRange(line.charAt(0) + "\n" + prev.charAt(prev.length - 1),
cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +
prev.charAt(prev.length - 1),
Pos(cur.line - 1, prev.length - 1), Pos(cur.line, 1), "+transpose");
}
}
Expand All @@ -5627,7 +5663,7 @@
var len = cm.listSelections().length;
for (var i = 0; i < len; i++) {
var range = cm.listSelections()[i];
cm.replaceRange("\n", range.anchor, range.head, "+input");
cm.replaceRange(cm.doc.lineSeparator(), range.anchor, range.head, "+input");
cm.indentLine(range.from().line + 1, null, true);
ensureCursorVisible(cm);
}
Expand Down Expand Up @@ -6791,7 +6827,7 @@
// is needed on Webkit to be able to get line-level bounding
// rectangles for it (in measureChar).
var content = elt("span", null, null, webkit ? "padding-right: .1px" : null);
var builder = {pre: elt("pre", [content]), content: content,
var builder = {pre: elt("pre", [content], "CodeMirror-line"), content: content,
col: 0, pos: 0, cm: cm,
splitSpaces: (ie || webkit) && cm.getOption("lineWrapping")};
lineView.measure = {};
Expand Down Expand Up @@ -6881,6 +6917,10 @@
txt.setAttribute("role", "presentation");
txt.setAttribute("cm-text", "\t");
builder.col += tabWidth;
} else if (m[0] == "\r" || m[0] == "\n") {
var txt = content.appendChild(elt("span", m[0] == "\r" ? "␍" : "␤", "cm-invalidchar"));
txt.setAttribute("cm-text", m[0]);
builder.col += 1;
} else {
var txt = builder.cm.options.specialCharPlaceholder(m[0]);
txt.setAttribute("cm-text", m[0]);
Expand Down Expand Up @@ -7226,8 +7266,8 @@
};

var nextDocId = 0;
var Doc = CodeMirror.Doc = function(text, mode, firstLine) {
if (!(this instanceof Doc)) return new Doc(text, mode, firstLine);
var Doc = CodeMirror.Doc = function(text, mode, firstLine, lineSep) {
if (!(this instanceof Doc)) return new Doc(text, mode, firstLine, lineSep);
if (firstLine == null) firstLine = 0;

BranchChunk.call(this, [new LeafChunk([new Line("", null)])]);
Expand All @@ -7241,8 +7281,9 @@
this.history = new History(null);
this.id = ++nextDocId;
this.modeOption = mode;
this.lineSep = lineSep;

if (typeof text == "string") text = splitLines(text);
if (typeof text == "string") text = this.splitLines(text);
updateDoc(this, {from: start, to: start, text: text});
setSelection(this, simpleSelection(start), sel_dontScroll);
};
Expand Down Expand Up @@ -7272,12 +7313,12 @@
getValue: function(lineSep) {
var lines = getLines(this, this.first, this.first + this.size);
if (lineSep === false) return lines;
return lines.join(lineSep || "\n");
return lines.join(lineSep || this.lineSeparator());
},
setValue: docMethodOp(function(code) {
var top = Pos(this.first, 0), last = this.first + this.size - 1;
makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),
text: splitLines(code), origin: "setValue", full: true}, true);
text: this.splitLines(code), origin: "setValue", full: true}, true);
setSelection(this, simpleSelection(top));
}),
replaceRange: function(code, from, to, origin) {
Expand All @@ -7288,7 +7329,7 @@
getRange: function(from, to, lineSep) {
var lines = getBetween(this, clipPos(this, from), clipPos(this, to));
if (lineSep === false) return lines;
return lines.join(lineSep || "\n");
return lines.join(lineSep || this.lineSeparator());
},

getLine: function(line) {var l = this.getLineHandle(line); return l && l.text;},
Expand Down Expand Up @@ -7354,13 +7395,13 @@
lines = lines ? lines.concat(sel) : sel;
}
if (lineSep === false) return lines;
else return lines.join(lineSep || "\n");
else return lines.join(lineSep || this.lineSeparator());
},
getSelections: function(lineSep) {
var parts = [], ranges = this.sel.ranges;
for (var i = 0; i < ranges.length; i++) {
var sel = getBetween(this, ranges[i].from(), ranges[i].to());
if (lineSep !== false) sel = sel.join(lineSep || "\n");
if (lineSep !== false) sel = sel.join(lineSep || this.lineSeparator());
parts[i] = sel;
}
return parts;
Expand All @@ -7375,7 +7416,7 @@
var changes = [], sel = this.sel;
for (var i = 0; i < sel.ranges.length; i++) {
var range = sel.ranges[i];
changes[i] = {from: range.from(), to: range.to(), text: splitLines(code[i]), origin: origin};
changes[i] = {from: range.from(), to: range.to(), text: this.splitLines(code[i]), origin: origin};
}
var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse);
for (var i = changes.length - 1; i >= 0; i--)
Expand Down Expand Up @@ -7525,7 +7566,8 @@
},

copy: function(copyHistory) {
var doc = new Doc(getLines(this, this.first, this.first + this.size), this.modeOption, this.first);
var doc = new Doc(getLines(this, this.first, this.first + this.size),
this.modeOption, this.first, this.lineSep);
doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;
doc.sel = this.sel;
doc.extend = false;
Expand All @@ -7541,7 +7583,7 @@
var from = this.first, to = this.first + this.size;
if (options.from != null && options.from > from) from = options.from;
if (options.to != null && options.to < to) to = options.to;
var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from);
var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep);
if (options.sharedHist) copy.history = this.history;
(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});
copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];
Expand Down Expand Up @@ -7570,7 +7612,13 @@
iterLinkedDocs: function(f) {linkedDocs(this, f);},

getMode: function() {return this.mode;},
getEditor: function() {return this.cm;}
getEditor: function() {return this.cm;},

splitLines: function(str) {
if (this.lineSep) return str.split(this.lineSep);
return splitLinesAuto(str);
},
lineSeparator: function() { return this.lineSep || "\n"; }
});

// Public alias.
Expand Down Expand Up @@ -8269,7 +8317,12 @@
} while (child = child.parentNode);
};

function activeElt() { return document.activeElement; }
function activeElt() {
var activeElement = document.activeElement;
while (activeElement && activeElement.root && activeElement.root.activeElement)
activeElement = activeElement.root.activeElement;
return activeElement;
}
// Older versions of IE throws unspecified error when touching
// document.activeElement in some cases (during loading, in iframe)
if (ie && ie_version < 11) activeElt = function() {
Expand Down Expand Up @@ -8371,7 +8424,7 @@

// See if "".split is the broken IE version, if so, provide an
// alternative way to split lines.
var splitLines = CodeMirror.splitLines = "\n\nb".split(/\n/).length != 3 ? function(string) {
var splitLinesAuto = CodeMirror.splitLines = "\n\nb".split(/\n/).length != 3 ? function(string) {
var pos = 0, result = [], l = string.length;
while (pos <= l) {
var nl = string.indexOf("\n", pos);
Expand Down Expand Up @@ -8729,7 +8782,7 @@

// THE END

CodeMirror.version = "5.4.0";
CodeMirror.version = "5.5.0";

return CodeMirror;
});
85 changes: 85 additions & 0 deletions mode/brainfuck/brainfuck.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE

// Brainfuck mode created by Michael Kaminsky https://github.com/mkaminsky11

(function(mod) {
if (typeof exports == "object" && typeof module == "object")
mod(require("../../lib/codemirror"))
else if (typeof define == "function" && define.amd)
define(["../../lib/codemirror"], mod)
else
mod(CodeMirror)
})(function(CodeMirror) {
"use strict"
var reserve = "><+-.,[]".split("");
/*
comments can be either:
placed behind lines
+++ this is a comment
where reserved characters cannot be used
or in a loop
[
this is ok to use [ ] and stuff
]
or preceded by #
*/
CodeMirror.defineMode("brainfuck", function() {
return {
startState: function() {
return {
commentLine: false,
left: 0,
right: 0,
commentLoop: false
}
},
token: function(stream, state) {
if (stream.eatSpace()) return null
if(stream.sol()){
state.commentLine = false;
}
var ch = stream.next().toString();
if(reserve.indexOf(ch) !== -1){
if(state.commentLine === true){
if(stream.eol()){
state.commentLine = false;
}
return "comment";
}
if(ch === "]" || ch === "["){
if(ch === "["){
state.left++;
}
else{
state.right++;
}
return "bracket";
}
else if(ch === "+" || ch === "-"){
return "keyword";
}
else if(ch === "<" || ch === ">"){
return "atom";
}
else if(ch === "." || ch === ","){
return "def";
}
}
else{
state.commentLine = true;
if(stream.eol()){
state.commentLine = false;
}
return "comment";
}
if(stream.eol()){
state.commentLine = false;
}
}
};
});
CodeMirror.defineMIME("text/x-brainfuck","brainfuck")
});
85 changes: 85 additions & 0 deletions mode/brainfuck/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<!doctype html>

<title>CodeMirror: Brainfuck mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">

<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="../../addon/edit/matchbrackets.js"></script>
<script src="./brainfuck.js"></script>
<style>
.CodeMirror { border: 2px inset #dee; }
</style>
<div id=nav>
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>

<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/codemirror/codemirror">Code</a>
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#"></a>
</ul>
</div>

<article>
<h2>Brainfuck mode</h2>
<form><textarea id="code" name="code">
[ This program prints "Hello World!" and a newline to the screen, its
length is 106 active command characters [it is not the shortest.]

This loop is a "comment loop", it's a simple way of adding a comment
to a BF program such that you don't have to worry about any command
characters. Any ".", ",", "+", "-", "&lt;" and "&gt;" characters are simply
ignored, the "[" and "]" characters just have to be balanced.
]
+++++ +++ Set Cell #0 to 8
[
&gt;++++ Add 4 to Cell #1; this will always set Cell #1 to 4
[ as the cell will be cleared by the loop
&gt;++ Add 2 to Cell #2
&gt;+++ Add 3 to Cell #3
&gt;+++ Add 3 to Cell #4
&gt;+ Add 1 to Cell #5
&lt;&lt;&lt;&lt;- Decrement the loop counter in Cell #1
] Loop till Cell #1 is zero; number of iterations is 4
&gt;+ Add 1 to Cell #2
&gt;+ Add 1 to Cell #3
&gt;- Subtract 1 from Cell #4
&gt;&gt;+ Add 1 to Cell #6
[&lt;] Move back to the first zero cell you find; this will
be Cell #1 which was cleared by the previous loop
&lt;- Decrement the loop Counter in Cell #0
] Loop till Cell #0 is zero; number of iterations is 8

The result of this is:
Cell No : 0 1 2 3 4 5 6
Contents: 0 0 72 104 88 32 8
Pointer : ^

&gt;&gt;. Cell #2 has value 72 which is 'H'
&gt;---. Subtract 3 from Cell #3 to get 101 which is 'e'
+++++++..+++. Likewise for 'llo' from Cell #3
&gt;&gt;. Cell #5 is 32 for the space
&lt;-. Subtract 1 from Cell #4 for 87 to give a 'W'
&lt;. Cell #3 was set to 'o' from the end of 'Hello'
+++.------.--------. Cell #3 for 'rl' and 'd'
&gt;&gt;+. Add 1 to Cell #5 gives us an exclamation point
&gt;++. And finally a newline from Cell #6
</textarea></form>

<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers: true,
matchBrackets: true,
mode: "text/x-brainfuck"
});
</script>

<p>A mode for Brainfuck</p>

<p><strong>MIME types defined:</strong> <code>text/x-brainfuck</code></p>
</article>
13 changes: 13 additions & 0 deletions mode/clike/clike.js
Original file line number Diff line number Diff line change
Expand Up @@ -588,4 +588,17 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
modeProps: {fold: "brace"}
});

def("text/x-squirrel", {
name: "clike",
keywords: words("base break clone continue const default delete enum extends function in class" +
" foreach local resume return this throw typeof yield constructor instanceof static"),
types: words(cTypes),
blockKeywords: words("case catch class else for foreach if switch try while"),
defKeywords: words("function local class"),
typeFirstDefinitions: true,
atoms: words("true false null"),
hooks: {"#": cppHook},
modeProps: {fold: ["brace", "include"]}
});

});
3 changes: 2 additions & 1 deletion mode/clike/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -247,5 +247,6 @@ <h2>Scala example</h2>
(Java), <code>text/x-csharp</code> (C#),
<code>text/x-objectivec</code> (Objective-C),
<code>text/x-scala</code> (Scala), <code>text/x-vertex</code>
and <code>x-shader/x-fragment</code> (shader programs).</p>
and <code>x-shader/x-fragment</code> (shader programs),
<code>text/x-squirrel</code> (Squirrel).</p>
</article>
2 changes: 2 additions & 0 deletions mode/css/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
override = "string-2";
else if (valueKeywords.hasOwnProperty(word))
override = "atom";
else if (colorKeywords.hasOwnProperty(word))
override = "keyword";
else
override = "error";
}
Expand Down
4 changes: 0 additions & 4 deletions mode/erlang/erlang.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,6 @@ CodeMirror.defineMode("erlang", function(cmCfg) {
}else{
return rval(state,stream,"function");
}
}else if (is_member(w,operatorAtomWords)) {
return rval(state,stream,"operator");
}else if (lookahead(stream) == ":") {
if (w == "erlang") {
return rval(state,stream,"builtin");
Expand All @@ -230,8 +228,6 @@ CodeMirror.defineMode("erlang", function(cmCfg) {
}
}else if (is_member(w,["true","false"])) {
return rval(state,stream,"boolean");
}else if (is_member(w,["true","false"])) {
return rval(state,stream,"boolean");
}else{
return rval(state,stream,"atom");
}
Expand Down
5 changes: 3 additions & 2 deletions mode/gfm/gfm.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ CodeMirror.defineMode("gfm", function(config, modeConfig) {
markdownConfig[attr] = modeConfig[attr];
}
markdownConfig.name = "markdown";
CodeMirror.defineMIME("gfmBase", markdownConfig);
return CodeMirror.overlayMode(CodeMirror.getMode(config, "gfmBase"), gfmOverlay);
return CodeMirror.overlayMode(CodeMirror.getMode(config, markdownConfig), gfmOverlay);

}, "markdown");

CodeMirror.defineMIME("text/x-gfm", "gfm");
});
3 changes: 3 additions & 0 deletions mode/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ <h2>Language modes</h2>
<li><a href="apl/index.html">APL</a></li>
<li><a href="asn.1/index.html">ASN.1</a></li>
<li><a href="asterisk/index.html">Asterisk dialplan</a></li>
<li><a href="brainfuck/index.html">Brainfuck</a></li>
<li><a href="clike/index.html">C, C++, C#</a></li>
<li><a href="clojure/index.html">Clojure</a></li>
<li><a href="cmake/index.html">CMake</a></li>
Expand Down Expand Up @@ -119,6 +120,7 @@ <h2>Language modes</h2>
<li><a href="stylus/index.html">Stylus</a></li>
<li><a href="sql/index.html">SQL</a> (several dialects)</li>
<li><a href="sparql/index.html">SPARQL</a></li>
<li><a href="clike/index.html">Squirrel</a></li>
<li><a href="swift/index.html">Swift</a></li>
<li><a href="stex/index.html">sTeX, LaTeX</a></li>
<li><a href="tcl/index.html">Tcl</a></li>
Expand All @@ -136,6 +138,7 @@ <h2>Language modes</h2>
<li><a href="vbscript/index.html">VBScript</a></li>
<li><a href="velocity/index.html">Velocity</a></li>
<li><a href="verilog/index.html">Verilog/SystemVerilog</a></li>
<li><a href="vhdl/index.html">VHDL</a></li>
<li><a href="xml/index.html">XML/HTML</a></li>
<li><a href="xquery/index.html">XQuery</a></li>
<li><a href="yaml/index.html">YAML</a></li>
Expand Down
14 changes: 7 additions & 7 deletions mode/markdown/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {

function htmlBlock(stream, state) {
var style = htmlMode.token(stream, state.htmlState);
if ((htmlFound && state.htmlState.tagStart === null && !state.htmlState.context) ||
if ((htmlFound && state.htmlState.tagStart === null &&
(!state.htmlState.context && state.htmlState.tokenize.isInText)) ||
(state.md_inside && stream.current().indexOf(">") > -1)) {
state.f = inlineNormal;
state.block = blockNormal;
Expand Down Expand Up @@ -446,12 +447,11 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
return type + linkemail;
}

if (ch === '<' && stream.match(/^\w/, false)) {
if (stream.string.indexOf(">") != -1) {
var atts = stream.string.substring(1,stream.string.indexOf(">"));
if (/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(atts)) {
state.md_inside = true;
}
if (ch === '<' && stream.match(/^(!--|\w)/, false)) {
var end = stream.string.indexOf(">", stream.pos);
if (end != -1) {
var atts = stream.string.substring(stream.start, end);
if (/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(atts)) state.md_inside = true;
}
stream.backUp(1);
state.htmlState = CodeMirror.startState(htmlMode);
Expand Down
4 changes: 3 additions & 1 deletion mode/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
CodeMirror.modeInfo = [
{name: "APL", mime: "text/apl", mode: "apl", ext: ["dyalog", "apl"]},
{name: "PGP", mimes: ["application/pgp", "application/pgp-keys", "application/pgp-signature"], mode: "asciiarmor", ext: ["pgp"]},
{name: "ASN.1", mime: "text/x-ttcn-asn", mode: "asn.1", ext: ["asn, asn1"]},
{name: "ASN.1", mime: "text/x-ttcn-asn", mode: "asn.1", ext: ["asn", "asn1"]},
{name: "Asterisk", mime: "text/x-asterisk", mode: "asterisk", file: /^extensions\.conf$/i},
{name: "Brainfuck", mime: "text/x-brainfuck", mode: "brainfuck", ext: ["b", "bf"]},
{name: "C", mime: "text/x-csrc", mode: "clike", ext: ["c", "h"]},
{name: "C++", mime: "text/x-c++src", mode: "clike", ext: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"], alias: ["cpp"]},
{name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy"]},
Expand Down Expand Up @@ -116,6 +117,7 @@
{name: "SPARQL", mime: "application/sparql-query", mode: "sparql", ext: ["rq", "sparql"], alias: ["sparul"]},
{name: "Spreadsheet", mime: "text/x-spreadsheet", mode: "spreadsheet", alias: ["excel", "formula"]},
{name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"]},
{name: "Squirrel", mime: "text/x-squirrel", mode: "clike", ext: ["nut"]},
{name: "Swift", mime: "text/x-swift", mode: "swift", ext: ["swift"]},
{name: "MariaDB", mime: "text/x-mariadb", mode: "sql"},
{name: "sTeX", mime: "text/x-stex", mode: "stex"},
Expand Down
2 changes: 1 addition & 1 deletion mode/ruby/ruby.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ CodeMirror.defineMode("ruby", function(config) {
}

function tokenBase(stream, state) {
curPunc = null;
if (stream.sol() && stream.match("=begin") && stream.eol()) {
state.tokenize.push(readBlockComment);
return "comment";
Expand Down Expand Up @@ -232,6 +231,7 @@ CodeMirror.defineMode("ruby", function(config) {
},

token: function(stream, state) {
curPunc = null;
if (stream.sol()) state.indented = stream.indentation();
var style = state.tokenize[state.tokenize.length-1](stream, state), kwtype;
var thisTok = curPunc;
Expand Down
2 changes: 1 addition & 1 deletion mode/rust/rust.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CodeMirror.defineMode("rust", function() {
};
var typeKeywords = function() {
var keywords = {"fn": "fn", "block": "fn", "obj": "obj"};
var atoms = "bool uint int i8 i16 i32 i64 u8 u16 u32 u64 float f32 f64 str char".split(" ");
var atoms = "bool i8 i16 i32 i64 u8 u16 u32 u64 f32 f64 str char isize usize".split(" ");
for (var i = 0, e = atoms.length; i < e; ++i) keywords[atoms[i]] = "atom";
return keywords;
}();
Expand Down
95 changes: 95 additions & 0 deletions mode/vhdl/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<!doctype html>

<title>CodeMirror: VHDL mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">

<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="../../addon/edit/matchbrackets.js"></script>
<script src="vhdl.js"></script>
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
<div id=nav>
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>

<ul>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/codemirror/codemirror">Code</a>
</ul>
<ul>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#">VHDL</a>
</ul>
</div>

<article>
<h2>VHDL mode</h2>

<div><textarea id="code" name="code">
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.numeric_std.ALL;

ENTITY tb IS
END tb;

ARCHITECTURE behavior OF tb IS
--Inputs
signal a : unsigned(2 downto 0) := (others => '0');
signal b : unsigned(2 downto 0) := (others => '0');
--Outputs
signal a_eq_b : std_logic;
signal a_le_b : std_logic;
signal a_gt_b : std_logic;

signal i,j : integer;

BEGIN

-- Instantiate the Unit Under Test (UUT)
uut: entity work.comparator PORT MAP (
a => a,
b => b,
a_eq_b => a_eq_b,
a_le_b => a_le_b,
a_gt_b => a_gt_b
);

-- Stimulus process
stim_proc: process
begin
for i in 0 to 8 loop
for j in 0 to 8 loop
a <= to_unsigned(i,3); --integer to unsigned type conversion
b <= to_unsigned(j,3);
wait for 10 ns;
end loop;
end loop;
end process;

END;
</textarea></div>

<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers: true,
matchBrackets: true,
mode: {
name: "vhdl",
}
});
</script>

<p>
Syntax highlighting and indentation for the VHDL language.
<h2>Configuration options:</h2>
<ul>
<li><strong>atoms</strong> - List of atom words. Default: "null"</li>
<li><strong>hooks</strong> - List of meta hooks. Default: ["`", "$"]</li>
<li><strong>multiLineStrings</strong> - Whether multi-line strings are accepted. Default: false</li>
</ul>
</p>

<p><strong>MIME types defined:</strong> <code>text/x-vhdl</code>.</p>
</article>
189 changes: 189 additions & 0 deletions mode/vhdl/vhdl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE

// Originall written by Alf Nielsen, re-written by Michael Zhou
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";

function words(str) {
var obj = {}, words = str.split(",");
for (var i = 0; i < words.length; ++i) {
var allCaps = words[i].toUpperCase();
var firstCap = words[i].charAt(0).toUpperCase() + words[i].slice(1);
obj[words[i]] = true;
obj[allCaps] = true;
obj[firstCap] = true;
}
return obj;
}

function metaHook(stream) {
stream.eatWhile(/[\w\$_]/);
return "meta";
}

CodeMirror.defineMode("vhdl", function(config, parserConfig) {
var indentUnit = config.indentUnit,
atoms = parserConfig.atoms || words("null"),
hooks = parserConfig.hooks || {"`": metaHook, "$": metaHook},
multiLineStrings = parserConfig.multiLineStrings;

var keywords = words("abs,access,after,alias,all,and,architecture,array,assert,attribute,begin,block," +
"body,buffer,bus,case,component,configuration,constant,disconnent,downto,else,elsif,end,end block,end case," +
"end component,end for,end generate,end if,end loop,end process,end record,end units,entity,exit,file,for," +
"function,generate,generic,generic map,group,guarded,if,impure,in,inertial,inout,is,label,library,linkage," +
"literal,loop,map,mod,nand,new,next,nor,null,of,on,open,or,others,out,package,package body,port,port map," +
"postponed,procedure,process,pure,range,record,register,reject,rem,report,return,rol,ror,select,severity,signal," +
"sla,sll,sra,srl,subtype,then,to,transport,type,unaffected,units,until,use,variable,wait,when,while,with,xnor,xor");

var blockKeywords = words("architecture,entity,begin,case,port,else,elsif,end,for,function,if");

var isOperatorChar = /[&|~><!\)\(*#%@+\/=?\:;}{,\.\^\-\[\]]/;
var curPunc;

function tokenBase(stream, state) {
var ch = stream.next();
if (hooks[ch]) {
var result = hooks[ch](stream, state);
if (result !== false) return result;
}
if (ch == '"') {
state.tokenize = tokenString2(ch);
return state.tokenize(stream, state);
}
if (ch == "'") {
state.tokenize = tokenString(ch);
return state.tokenize(stream, state);
}
if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
curPunc = ch;
return null;
}
if (/[\d']/.test(ch)) {
stream.eatWhile(/[\w\.']/);
return "number";
}
if (ch == "-") {
if (stream.eat("-")) {
stream.skipToEnd();
return "comment";
}
}
if (isOperatorChar.test(ch)) {
stream.eatWhile(isOperatorChar);
return "operator";
}
stream.eatWhile(/[\w\$_]/);
var cur = stream.current();
if (keywords.propertyIsEnumerable(cur.toLowerCase())) {
if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
return "keyword";
}
if (atoms.propertyIsEnumerable(cur)) return "atom";
return "variable";
}

function tokenString(quote) {
return function(stream, state) {
var escaped = false, next, end = false;
while ((next = stream.next()) != null) {
if (next == quote && !escaped) {end = true; break;}
escaped = !escaped && next == "--";
}
if (end || !(escaped || multiLineStrings))
state.tokenize = tokenBase;
return "string";
};
}
function tokenString2(quote) {
return function(stream, state) {
var escaped = false, next, end = false;
while ((next = stream.next()) != null) {
if (next == quote && !escaped) {end = true; break;}
escaped = !escaped && next == "--";
}
if (end || !(escaped || multiLineStrings))
state.tokenize = tokenBase;
return "string-2";
};
}

function Context(indented, column, type, align, prev) {
this.indented = indented;
this.column = column;
this.type = type;
this.align = align;
this.prev = prev;
}
function pushContext(state, col, type) {
return state.context = new Context(state.indented, col, type, null, state.context);
}
function popContext(state) {
var t = state.context.type;
if (t == ")" || t == "]" || t == "}")
state.indented = state.context.indented;
return state.context = state.context.prev;
}

// Interface
return {
startState: function(basecolumn) {
return {
tokenize: null,
context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
indented: 0,
startOfLine: true
};
},

token: function(stream, state) {
var ctx = state.context;
if (stream.sol()) {
if (ctx.align == null) ctx.align = false;
state.indented = stream.indentation();
state.startOfLine = true;
}
if (stream.eatSpace()) return null;
curPunc = null;
var style = (state.tokenize || tokenBase)(stream, state);
if (style == "comment" || style == "meta") return style;
if (ctx.align == null) ctx.align = true;

if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state);
else if (curPunc == "{") pushContext(state, stream.column(), "}");
else if (curPunc == "[") pushContext(state, stream.column(), "]");
else if (curPunc == "(") pushContext(state, stream.column(), ")");
else if (curPunc == "}") {
while (ctx.type == "statement") ctx = popContext(state);
if (ctx.type == "}") ctx = popContext(state);
while (ctx.type == "statement") ctx = popContext(state);
}
else if (curPunc == ctx.type) popContext(state);
else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement"))
pushContext(state, stream.column(), "statement");
state.startOfLine = false;
return style;
},

indent: function(state, textAfter) {
if (state.tokenize != tokenBase && state.tokenize != null) return 0;
var firstChar = textAfter && textAfter.charAt(0), ctx = state.context, closing = firstChar == ctx.type;
if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : indentUnit);
else if (ctx.align) return ctx.column + (closing ? 0 : 1);
else return ctx.indented + (closing ? 0 : indentUnit);
},

electricChars: "{}"
};
});

CodeMirror.defineMIME("text/x-vhdl", "vhdl");

});
1 change: 1 addition & 0 deletions mode/xml/xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ CodeMirror.defineMode("xml", function(config, parserConfig) {
return null;
}
}
inText.isInText = true;

function inTag(stream, state) {
var ch = stream.next();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codemirror",
"version":"5.4.0",
"version":"5.5.0",
"main": "lib/codemirror.js",
"description": "In-browser code editing made bearable",
"license": "MIT",
Expand Down
6 changes: 6 additions & 0 deletions test/emacs_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,10 @@
cm.triggerOnKeyDown(fakeEvent("Ctrl-S"));
is(saved, "hi");
}, {value: "hi", keyMap: "emacs"});

testCM("gotoInvalidLineFloat", function(cm) {
cm.openDialog = function(_, cb) { cb("2.2"); };
cm.triggerOnKeyDown(fakeEvent("Alt-G"));
cm.triggerOnKeyDown(fakeEvent("G"));
}, {value: "1\n2\n3\n4", keyMap: "emacs"});
})();
10 changes: 10 additions & 0 deletions test/scroll_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,14 @@
cm.replaceSelection("\n");
is(cm.cursorCoords(null, "window").bottom < displayBottom(cm, false));
}, {lineWrapping: true});

testCM("height_auto_with_gutter_expect_no_scroll_after_line_delete", function(cm) {
cm.setSize(null, "auto");
cm.setValue("x\n");
cm.execCommand("goDocEnd");
cm.execCommand("delCharBefore");
eq(cm.getScrollInfo().top, 0);
cm.scrollTo(null, 10);
is(cm.getScrollInfo().top < 5);
}, {lineNumbers: true});
})();
17 changes: 16 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@ testCM("addLineClass", function(cm) {
eq(byClassName(lines, "foo").length, 2);
eq(byClassName(lines, "bar").length, 1);
eq(byClassName(lines, "baz").length, 1);
eq(byClassName(lines, "gutter-class").length, 1);
eq(byClassName(lines, "gutter-class").length, 2); // Gutter classes are reflected in 2 nodes
cm.removeLineClass(0, "text", "foo");
cls(0, "bar", null, null, null);
cm.removeLineClass(0, "text", "foo");
Expand Down Expand Up @@ -2125,3 +2125,18 @@ test("core_addClass", function() {
CodeMirror.addClass(node, "b");
eq(node.className, "a b");
});

testCM("lineSeparator", function(cm) {
eq(cm.lineCount(), 3);
eq(cm.getLine(1), "bar\r");
eq(cm.getLine(2), "baz\rquux");
cm.setOption("lineSeparator", "\r");
eq(cm.lineCount(), 5);
eq(cm.getLine(4), "quux");
eq(cm.getValue(), "foo\rbar\r\rbaz\rquux");
eq(cm.getValue("\n"), "foo\nbar\n\nbaz\nquux");
cm.setOption("lineSeparator", null);
cm.setValue("foo\nbar\r\nbaz\rquux");
eq(cm.lineCount(), 4);
}, {value: "foo\nbar\r\nbaz\rquux",
lineSeparator: "\n"});
15 changes: 9 additions & 6 deletions test/vim_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ testVim('%_skip_string', function(cm, vim, helpers) {
helpers.doKeys(['%']);
helpers.assertCursorAt(0,0);
}, {value:'(")")'});
(')')
testVim('%_skip_comment', function(cm, vim, helpers) {
cm.setCursor(0,0);
helpers.doKeys(['%']);
Expand Down Expand Up @@ -3128,8 +3127,7 @@ testVim('zt==z<CR>', function(cm, vim, helpers){
});

var moveTillCharacterSandbox =
'The quick brown fox \n'
'jumped over the lazy dog.'
'The quick brown fox \n';
testVim('moveTillCharacter', function(cm, vim, helpers){
cm.setCursor(0, 0);
// Search for the 'q'.
Expand Down Expand Up @@ -3176,9 +3174,6 @@ testVim('searchForPipe', function(cm, vim, helpers){


var scrollMotionSandbox =
'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n'
'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n'
'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n'
'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n';
testVim('scrollMotion', function(cm, vim, helpers){
var prevCursor, prevScrollInfo;
Expand Down Expand Up @@ -3397,6 +3392,14 @@ testVim('ex_sort_decimal_mixed_reverse', function(cm, vim, helpers) {
helpers.doEx('sort! d');
eq('a3\nb2\nc1\nz\ny', cm.getValue());
}, { value: 'a3\nz\nc1\ny\nb2'});
testVim('ex_sort_patterns_not_supported', function(cm, vim, helpers) {
var notified = false;
cm.openNotification = helpers.fakeOpenNotification(function(text) {
notified = /patterns not supported/.test(text);
});
helpers.doEx('sort /abc/');
is(notified, 'No notification.');
});
// test for :global command
testVim('ex_global', function(cm, vim, helpers) {
cm.setCursor(0, 0);
Expand Down
5 changes: 3 additions & 2 deletions theme/3024-day.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

.cm-s-3024-day.CodeMirror {background: #f7f7f7; color: #3a3432;}
.cm-s-3024-day div.CodeMirror-selected {background: #d6d5d4 !important;}
.cm-s-3024-day.CodeMirror ::selection { background: #d6d5d4; }
.cm-s-3024-day.CodeMirror ::-moz-selection { background: #d9d9d9; }

.cm-s-3024-day .CodeMirror-line::selection, .cm-s-3024-day .CodeMirror-line > span::selection, .cm-s-3024-day .CodeMirror-line > span > span::selection { background: #d6d5d4; }
.cm-s-3024-day .CodeMirror-line::-moz-selection, .cm-s-3024-day .CodeMirror-line > span::-moz-selection, .cm-s-3024-day .CodeMirror-line > span > span::selection { background: #d9d9d9; }

.cm-s-3024-day .CodeMirror-gutters {background: #f7f7f7; border-right: 0px;}
.cm-s-3024-day .CodeMirror-guttermarker { color: #db2d20; }
Expand Down
4 changes: 2 additions & 2 deletions theme/3024-night.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

.cm-s-3024-night.CodeMirror {background: #090300; color: #d6d5d4;}
.cm-s-3024-night div.CodeMirror-selected {background: #3a3432 !important;}
.cm-s-3024-night.CodeMirror ::selection { background: rgba(58, 52, 50, .99); }
.cm-s-3024-night.CodeMirror ::-moz-selection { background: rgba(58, 52, 50, .99); }
.cm-s-3024-night .CodeMirror-line::selection, .cm-s-3024-night .CodeMirror-line > span::selection, .cm-s-3024-night .CodeMirror-line > span > span::selection { background: rgba(58, 52, 50, .99); }
.cm-s-3024-night .CodeMirror-line::-moz-selection, .cm-s-3024-night .CodeMirror-line > span::-moz-selection, .cm-s-3024-night .CodeMirror-line > span > span::-moz-selection { background: rgba(58, 52, 50, .99); }
.cm-s-3024-night .CodeMirror-gutters {background: #090300; border-right: 0px;}
.cm-s-3024-night .CodeMirror-guttermarker { color: #db2d20; }
.cm-s-3024-night .CodeMirror-guttermarker-subtle { color: #5c5855; }
Expand Down
4 changes: 2 additions & 2 deletions theme/ambiance.css
4 changes: 2 additions & 2 deletions theme/base16-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

.cm-s-base16-dark.CodeMirror {background: #151515; color: #e0e0e0;}
.cm-s-base16-dark div.CodeMirror-selected {background: #303030 !important;}
.cm-s-base16-dark.CodeMirror ::selection { background: rgba(48, 48, 48, .99); }
.cm-s-base16-dark.CodeMirror ::-moz-selection { background: rgba(48, 48, 48, .99); }
.cm-s-base16-dark .CodeMirror-line::selection, .cm-s-base16-dark .CodeMirror-line > span::selection, .cm-s-base16-dark .CodeMirror-line > span > span::selection { background: rgba(48, 48, 48, .99); }
.cm-s-base16-dark .CodeMirror-line::-moz-selection, .cm-s-base16-dark .CodeMirror-line > span::-moz-selection, .cm-s-base16-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(48, 48, 48, .99); }
.cm-s-base16-dark .CodeMirror-gutters {background: #151515; border-right: 0px;}
.cm-s-base16-dark .CodeMirror-guttermarker { color: #ac4142; }
.cm-s-base16-dark .CodeMirror-guttermarker-subtle { color: #505050; }
Expand Down
4 changes: 2 additions & 2 deletions theme/base16-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

.cm-s-base16-light.CodeMirror {background: #f5f5f5; color: #202020;}
.cm-s-base16-light div.CodeMirror-selected {background: #e0e0e0 !important;}
.cm-s-base16-light.CodeMirror ::selection { background: #e0e0e0; }
.cm-s-base16-light.CodeMirror ::-moz-selection { background: #e0e0e0; }
.cm-s-base16-light .CodeMirror-line::selection, .cm-s-base16-light .CodeMirror-line > span::selection, .cm-s-base16-light .CodeMirror-line > span > span::selection { background: #e0e0e0; }
.cm-s-base16-light .CodeMirror-line::-moz-selection, .cm-s-base16-light .CodeMirror-line > span::-moz-selection, .cm-s-base16-light .CodeMirror-line > span > span::-moz-selection { background: #e0e0e0; }
.cm-s-base16-light .CodeMirror-gutters {background: #f5f5f5; border-right: 0px;}
.cm-s-base16-light .CodeMirror-guttermarker { color: #ac4142; }
.cm-s-base16-light .CodeMirror-guttermarker-subtle { color: #b0b0b0; }
Expand Down
4 changes: 2 additions & 2 deletions theme/blackboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

.cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; }
.cm-s-blackboard .CodeMirror-selected { background: #253B76 !important; }
.cm-s-blackboard.CodeMirror ::selection { background: rgba(37, 59, 118, .99); }
.cm-s-blackboard.CodeMirror ::-moz-selection { background: rgba(37, 59, 118, .99); }
.cm-s-blackboard .CodeMirror-line::selection, .cm-s-blackboard .CodeMirror-line > span::selection, .cm-s-blackboard .CodeMirror-line > span > span::selection { background: rgba(37, 59, 118, .99); }
.cm-s-blackboard .CodeMirror-line::-moz-selection, .cm-s-blackboard .CodeMirror-line > span::-moz-selection, .cm-s-blackboard .CodeMirror-line > span > span::-moz-selection { background: rgba(37, 59, 118, .99); }
.cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; }
.cm-s-blackboard .CodeMirror-guttermarker { color: #FBDE2D; }
.cm-s-blackboard .CodeMirror-guttermarker-subtle { color: #888; }
Expand Down
4 changes: 2 additions & 2 deletions theme/cobalt.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.cm-s-cobalt.CodeMirror { background: #002240; color: white; }
.cm-s-cobalt div.CodeMirror-selected { background: #b36539 !important; }
.cm-s-cobalt.CodeMirror ::selection { background: rgba(179, 101, 57, .99); }
.cm-s-cobalt.CodeMirror ::-moz-selection { background: rgba(179, 101, 57, .99); }
.cm-s-cobalt .CodeMirror-line::selection, .cm-s-cobalt .CodeMirror-line > span::selection, .cm-s-cobalt .CodeMirror-line > span > span::selection { background: rgba(179, 101, 57, .99); }
.cm-s-cobalt .CodeMirror-line::-moz-selection, .cm-s-cobalt .CodeMirror-line > span::-moz-selection, .cm-s-cobalt .CodeMirror-line > span > span::-moz-selection { background: rgba(179, 101, 57, .99); }
.cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
.cm-s-cobalt .CodeMirror-guttermarker { color: #ffee80; }
.cm-s-cobalt .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
Expand Down
87 changes: 87 additions & 0 deletions theme/dracula.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/*
Name: dracula
Author: Michael Kaminsky (http://github.com/mkaminsky11)
Original dracula color scheme by Zeno Rocha (https://github.com/zenorocha/dracula-theme)
*/


.cm-s-dracula.CodeMirror, .cm-s-dracula .CodeMirror-gutters {
background-color: #282a36 !important;
color: #f8f8f2 !important;
border: none;
}
.cm-s-dracula .CodeMirror-gutters{
color: #282a36;
}
.cm-s-dracula .CodeMirror-cursor {
border-left: solid thin #f8f8f0 !important;
}
.cm-s-dracula .CodeMirror-linenumber {
color: #6D8A88;
}
.cm-s-dracula.CodeMirror-focused .CodeMirror-selected {
background: rgba(255, 255, 255, 0.10);
}
.cm-s-dracula .CodeMirror-line::selection, .cm-s-dracula .CodeMirror-line > span::selection, .cm-s-dracula .CodeMirror-line > span > span::selection {
background: rgba(255, 255, 255, 0.10);
}
.cm-s-dracula .CodeMirror-line::-moz-selection, .cm-s-dracula .CodeMirror-line > span::-moz-selection, .cm-s-dracula .CodeMirror-line > span > span::-moz-selection {
background: rgba(255, 255, 255, 0.10);
}
.cm-s-dracula span.cm-comment {
color: #6272a4;
}
.cm-s-dracula span.cm-string, .cm-s-dracula span.cm-string-2 {
color: #f1fa8c;
}
.cm-s-dracula span.cm-number {
color: #bd93f9;
}
.cm-s-dracula span.cm-variable {
color: #50fa7b;
}
.cm-s-dracula span.cm-variable-2 {
color: white;
}
.cm-s-dracula span.cm-def {
color: #ffb86c;
}
.cm-s-dracula span.cm-keyword {
color: #ff79c6;
}
.cm-s-dracula span.cm-operator {
color: #ff79c6;
}
.cm-s-dracula span.cm-keyword {
color: #ff79c6;
}
.cm-s-dracula span.cm-atom {
color: #bd93f9;
}
.cm-s-dracula span.cm-meta {
color: #f8f8f2;
}
.cm-s-dracula span.cm-tag {
color: #ff79c6;
}
.cm-s-dracula span.cm-attribute {
color: #50fa7b;
}
.cm-s-dracula span.cm-qualifier {
color: #50fa7b;
}
.cm-s-dracula span.cm-property {
color: #66d9ef;
}
.cm-s-dracula span.cm-builtin {
color: #50fa7b;
}
.cm-s-dracula span.cm-variable-3 {
color: #50fa7b;
}

.cm-s-dracula .CodeMirror-activeline-background {background: rgba(255,255,255,0.1) !important;}
.cm-s-dracula .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
4 changes: 2 additions & 2 deletions theme/erlang-dark.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.cm-s-erlang-dark.CodeMirror { background: #002240; color: white; }
.cm-s-erlang-dark div.CodeMirror-selected { background: #b36539 !important; }
.cm-s-erlang-dark.CodeMirror ::selection { background: rgba(179, 101, 57, .99); }
.cm-s-erlang-dark.CodeMirror ::-moz-selection { background: rgba(179, 101, 57, .99); }
.cm-s-erlang-dark .CodeMirror-line::selection, .cm-s-erlang-dark .CodeMirror-line > span::selection, .cm-s-erlang-dark .CodeMirror-line > span > span::selection { background: rgba(179, 101, 57, .99); }
.cm-s-erlang-dark .CodeMirror-line::-moz-selection, .cm-s-erlang-dark .CodeMirror-line > span::-moz-selection, .cm-s-erlang-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(179, 101, 57, .99); }
.cm-s-erlang-dark .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
.cm-s-erlang-dark .CodeMirror-guttermarker { color: white; }
.cm-s-erlang-dark .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
Expand Down
42 changes: 42 additions & 0 deletions theme/icecoder.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
ICEcoder default theme by Matt Pass, used in code editor available at https://icecoder.net
*/

.cm-s-icecoder {color: #666; background: #141612}

.cm-s-icecoder span.cm-keyword {color: #eee; font-weight:bold} /* off-white 1 */
.cm-s-icecoder span.cm-atom {color: #e1c76e} /* yellow */
.cm-s-icecoder span.cm-number {color: #6cb5d9} /* blue */
.cm-s-icecoder span.cm-def {color: #b9ca4a} /* green */

.cm-s-icecoder span.cm-variable {color: #6cb5d9} /* blue */
.cm-s-icecoder span.cm-variable-2 {color: #cc1e5c} /* pink */
.cm-s-icecoder span.cm-variable-3 {color: #f9602c} /* orange */

.cm-s-icecoder span.cm-property {color: #eee} /* off-white 1 */
.cm-s-icecoder span.cm-operator {color: #9179bb} /* purple */
.cm-s-icecoder span.cm-comment {color: #97a3aa} /* grey-blue */

.cm-s-icecoder span.cm-string {color: #b9ca4a} /* green */
.cm-s-icecoder span.cm-string-2 {color: #6cb5d9} /* blue */

.cm-s-icecoder span.cm-meta {color: #555} /* grey */

.cm-s-icecoder span.cm-qualifier {color: #555} /* grey */
.cm-s-icecoder span.cm-builtin {color: #214e7b} /* bright blue */
.cm-s-icecoder span.cm-bracket {color: #cc7} /* grey-yellow */

.cm-s-icecoder span.cm-tag {color: #e8e8e8} /* off-white 2 */
.cm-s-icecoder span.cm-attribute {color: #099} /* teal */

.cm-s-icecoder span.cm-header {color: #6a0d6a} /* purple-pink */
.cm-s-icecoder span.cm-quote {color: #186718} /* dark green */
.cm-s-icecoder span.cm-hr {color: #888} /* mid-grey */
.cm-s-icecoder span.cm-link {color: #e1c76e} /* yellow */
.cm-s-icecoder span.cm-error {color: #d00} /* red */

.cm-s-icecoder .CodeMirror-cursor {border-left: 1px solid white !important}
.cm-s-icecoder .CodeMirror-selected {color: #fff !important; background: #037 !important}
.cm-s-icecoder .CodeMirror-gutters {background: #141612; min-width: 41px; border-right: 0}
.cm-s-icecoder .CodeMirror-linenumber {color: #555; cursor: default}
.cm-s-icecoder .CodeMirror-matchingbracket {border: 1px solid grey; color: black !important}
4 changes: 2 additions & 2 deletions theme/lesser-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Ported to CodeMirror by Peter Kroon
}
.cm-s-lesser-dark.CodeMirror { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; }
.cm-s-lesser-dark div.CodeMirror-selected {background: #45443B !important;} /* 33322B*/
.cm-s-lesser-dark.CodeMirror ::selection { background: rgba(69, 68, 59, .99); }
.cm-s-lesser-dark.CodeMirror ::-moz-selection { background: rgba(69, 68, 59, .99); }
.cm-s-lesser-dark .CodeMirror-line::selection, .cm-s-lesser-dark .CodeMirror-line > span::selection, .cm-s-lesser-dark .CodeMirror-line > span > span::selection { background: rgba(69, 68, 59, .99); }
.cm-s-lesser-dark .CodeMirror-line::-moz-selection, .cm-s-lesser-dark .CodeMirror-line > span::-moz-selection, .cm-s-lesser-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(69, 68, 59, .99); }
.cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/

Expand Down
105 changes: 105 additions & 0 deletions theme/material.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/*
Name: material
Author: Michael Kaminsky (http://github.com/mkaminsky11)
Original material color scheme by Mattia Astorino (https://github.com/equinusocio/material-theme)
*/

.cm-s-material {
background-color: #263238;
color: rgba(233, 237, 237, 1);
}
.cm-s-material .CodeMirror-gutters {
background: #263238;
color: rgb(83,127,126);
border: none;
}
.cm-s-material .CodeMirror-guttermarker, .cm-s-material .CodeMirror-guttermarker-subtle, .cm-s-material .CodeMirror-linenumber {
color: rgb(83,127,126);
}
.cm-s-material .CodeMirror-cursor {
border-left: 1px solid #f8f8f0 !important;
}
.cm-s-material .CodeMirror-selected {
background: rgba(255, 255, 255, 0.15);
}
.cm-s-material.CodeMirror-focused .CodeMirror-selected {
background: rgba(255, 255, 255, 0.10);
}
.cm-s-material .CodeMirror-line::selection, .cm-s-material .CodeMirror-line > span::selection, .cm-s-material .CodeMirror-line > span > span::selection {
background: rgba(255, 255, 255, 0.10);
}
.cm-s-material .CodeMirror-line::-moz-selection, .cm-s-material .CodeMirror-line > span::-moz-selection, .cm-s-material .CodeMirror-line > span > span::-moz-selection {
background: rgba(255, 255, 255, 0.10);
}

.CodeMirror-activeline-background {
background: rgba(0, 0, 0, 0) !important;
}
.cm-s-material span.cm-keyword {
color: rgba(199, 146, 234, 1);
}
.cm-s-material span.cm-operator {
color: rgba(233, 237, 237, 1);
}
.cm-s-material span.cm-variable-2 {
color: #80CBC4;
}
.cm-s-material span.cm-variable-3 {
color: #82B1FF;
}
.cm-s-material span.cm-builtin {
color: #DECB6B;
}
.cm-s-material span.cm-atom {
color: #F77669;
}
.cm-s-material span.cm-number {
color: #F77669;
}
.cm-s-material span.cm-def {
color: rgba(233, 237, 237, 1);
}
.cm-s-material span.cm-error {
color: rgba(255, 255, 255, 1.0);
background-color: #EC5F67;
}
.cm-s-material span.cm-string {
color: #C3E88D;
}
.cm-s-material span.cm-string-2 {
color: #80CBC4;
}
.cm-s-material span.cm-comment {
color: #546E7A;
}
.cm-s-material span.cm-variable {
color: #82B1FF;
}
.cm-s-material span.cm-tag {
color: #80CBC4;
}
.cm-s-material span.cm-meta{
color: #80CBC4;
}
.cm-s-material span.cm-attribute {
color: #FFCB6B;
}
.cm-s-material span.cm-property {
color: #80CBAE;
}
.cm-s-material span.cm-qualifier {
color: #DECB6B;
}
.cm-s-material span.cm-variable-3{
color: #DECB6B;
}
.cm-s-material span.cm-tag {
color: rgba(255, 83, 112, 1);
}
.cm-s-material .CodeMirror-matchingbracket {
text-decoration: underline;
color: white !important;
}
4 changes: 2 additions & 2 deletions theme/mbo.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

.cm-s-mbo.CodeMirror {background: #2c2c2c; color: #ffffec;}
.cm-s-mbo div.CodeMirror-selected {background: #716C62 !important;}
.cm-s-mbo.CodeMirror ::selection { background: rgba(113, 108, 98, .99); }
.cm-s-mbo.CodeMirror ::-moz-selection { background: rgba(113, 108, 98, .99); }
.cm-s-mbo .CodeMirror-line::selection, .cm-s-mbo .CodeMirror-line > span::selection, .cm-s-mbo .CodeMirror-line > span > span::selection { background: rgba(113, 108, 98, .99); }
.cm-s-mbo .CodeMirror-line::-moz-selection, .cm-s-mbo .CodeMirror-line > span::-moz-selection, .cm-s-mbo .CodeMirror-line > span > span::-moz-selection { background: rgba(113, 108, 98, .99); }
.cm-s-mbo .CodeMirror-gutters {background: #4e4e4e; border-right: 0px;}
.cm-s-mbo .CodeMirror-guttermarker { color: white; }
.cm-s-mbo .CodeMirror-guttermarker-subtle { color: grey; }
Expand Down
4 changes: 2 additions & 2 deletions theme/mdn-like.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*/
.cm-s-mdn-like.CodeMirror { color: #999; background-color: #fff; }
.cm-s-mdn-like .CodeMirror-selected { background: #cfc !important; }
.cm-s-mdn-like.CodeMirror ::selection { background: #cfc; }
.cm-s-mdn-like.CodeMirror ::-moz-selection { background: #cfc; }
.cm-s-mdn-like .CodeMirror-line::selection, .cm-s-mdn-like .CodeMirror-line > span::selection, .cm-s-mdn-like .CodeMirror-line > span > span::selection { background: #cfc; }
.cm-s-mdn-like .CodeMirror-line::-moz-selection, .cm-s-mdn-like .CodeMirror-line > span::-moz-selection, .cm-s-mdn-like .CodeMirror-line > span > span::-moz-selection { background: #cfc; }

.cm-s-mdn-like .CodeMirror-gutters { background: #f8f8f8; border-left: 6px solid rgba(0,83,159,0.65); color: #333; }
.cm-s-mdn-like .CodeMirror-linenumber { color: #aaa; padding-left: 8px; }
Expand Down
4 changes: 2 additions & 2 deletions theme/midnight.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
.cm-s-midnight.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}

.cm-s-midnight div.CodeMirror-selected {background: #314D67 !important;}
.cm-s-midnight.CodeMirror ::selection { background: rgba(49, 77, 103, .99); }
.cm-s-midnight.CodeMirror ::-moz-selection { background: rgba(49, 77, 103, .99); }
.cm-s-midnight .CodeMirror-line::selection, .cm-s-midnight .CodeMirror-line > span::selection, .cm-s-midnight .CodeMirror-line > span > span::selection { background: rgba(49, 77, 103, .99); }
.cm-s-midnight .CodeMirror-line::-moz-selection, .cm-s-midnight .CodeMirror-line > span::-moz-selection, .cm-s-midnight .CodeMirror-line > span > span::-moz-selection { background: rgba(49, 77, 103, .99); }
.cm-s-midnight .CodeMirror-gutters {background: #0F192A; border-right: 1px solid;}
.cm-s-midnight .CodeMirror-guttermarker { color: white; }
.cm-s-midnight .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
Expand Down
4 changes: 2 additions & 2 deletions theme/monokai.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

.cm-s-monokai.CodeMirror {background: #272822; color: #f8f8f2;}
.cm-s-monokai div.CodeMirror-selected {background: #49483E !important;}
.cm-s-monokai.CodeMirror ::selection { background: rgba(73, 72, 62, .99); }
.cm-s-monokai.CodeMirror ::-moz-selection { background: rgba(73, 72, 62, .99); }
.cm-s-monokai .CodeMirror-line::selection, .cm-s-monokai .CodeMirror-line > span::selection, .cm-s-monokai .CodeMirror-line > span > span::selection { background: rgba(73, 72, 62, .99); }
.cm-s-monokai .CodeMirror-line::-moz-selection, .cm-s-monokai .CodeMirror-line > span::-moz-selection, .cm-s-monokai .CodeMirror-line > span > span::-moz-selection { background: rgba(73, 72, 62, .99); }
.cm-s-monokai .CodeMirror-gutters {background: #272822; border-right: 0px;}
.cm-s-monokai .CodeMirror-guttermarker { color: white; }
.cm-s-monokai .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
Expand Down
4 changes: 2 additions & 2 deletions theme/night.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

.cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; }
.cm-s-night div.CodeMirror-selected { background: #447 !important; }
.cm-s-night.CodeMirror ::selection { background: rgba(68, 68, 119, .99); }
.cm-s-night.CodeMirror ::-moz-selection { background: rgba(68, 68, 119, .99); }
.cm-s-night .CodeMirror-line::selection, .cm-s-night .CodeMirror-line > span::selection, .cm-s-night .CodeMirror-line > span > span::selection { background: rgba(68, 68, 119, .99); }
.cm-s-night .CodeMirror-line::-moz-selection, .cm-s-night .CodeMirror-line > span::-moz-selection, .cm-s-night .CodeMirror-line > span > span::-moz-selection { background: rgba(68, 68, 119, .99); }
.cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
.cm-s-night .CodeMirror-guttermarker { color: white; }
.cm-s-night .CodeMirror-guttermarker-subtle { color: #bbb; }
Expand Down
4 changes: 2 additions & 2 deletions theme/paraiso-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

.cm-s-paraiso-dark.CodeMirror {background: #2f1e2e; color: #b9b6b0;}
.cm-s-paraiso-dark div.CodeMirror-selected {background: #41323f !important;}
.cm-s-paraiso-dark.CodeMirror ::selection { background: rgba(65, 50, 63, .99); }
.cm-s-paraiso-dark.CodeMirror ::-moz-selection { background: rgba(65, 50, 63, .99); }
.cm-s-paraiso-dark .CodeMirror-line::selection, .cm-s-paraiso-dark .CodeMirror-line > span::selection, .cm-s-paraiso-dark .CodeMirror-line > span > span::selection { background: rgba(65, 50, 63, .99); }
.cm-s-paraiso-dark .CodeMirror-line::-moz-selection, .cm-s-paraiso-dark .CodeMirror-line > span::-moz-selection, .cm-s-paraiso-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(65, 50, 63, .99); }
.cm-s-paraiso-dark .CodeMirror-gutters {background: #2f1e2e; border-right: 0px;}
.cm-s-paraiso-dark .CodeMirror-guttermarker { color: #ef6155; }
.cm-s-paraiso-dark .CodeMirror-guttermarker-subtle { color: #776e71; }
Expand Down
4 changes: 2 additions & 2 deletions theme/paraiso-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

.cm-s-paraiso-light.CodeMirror {background: #e7e9db; color: #41323f;}
.cm-s-paraiso-light div.CodeMirror-selected {background: #b9b6b0 !important;}
.cm-s-paraiso-light.CodeMirror ::selection { background: #b9b6b0; }
.cm-s-paraiso-light.CodeMirror ::-moz-selection { background: #b9b6b0; }
.cm-s-paraiso-light .CodeMirror-line::selection, .cm-s-paraiso-light .CodeMirror-line > span::selection, .cm-s-paraiso-light .CodeMirror-line > span > span::selection { background: #b9b6b0; }
.cm-s-paraiso-light .CodeMirror-line::-moz-selection, .cm-s-paraiso-light .CodeMirror-line > span::-moz-selection, .cm-s-paraiso-light .CodeMirror-line > span > span::-moz-selection { background: #b9b6b0; }
.cm-s-paraiso-light .CodeMirror-gutters {background: #e7e9db; border-right: 0px;}
.cm-s-paraiso-light .CodeMirror-guttermarker { color: black; }
.cm-s-paraiso-light .CodeMirror-guttermarker-subtle { color: #8d8687; }
Expand Down
4 changes: 2 additions & 2 deletions theme/pastel-on-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
font-size: 14px;
}
.cm-s-pastel-on-dark div.CodeMirror-selected { background: rgba(221,240,255,0.2) !important; }
.cm-s-pastel-on-dark.CodeMirror ::selection { background: rgba(221,240,255,0.2); }
.cm-s-pastel-on-dark.CodeMirror ::-moz-selection { background: rgba(221,240,255,0.2); }
.cm-s-pastel-on-dark .CodeMirror-line::selection, .cm-s-pastel-on-dark .CodeMirror-line > span::selection, .cm-s-pastel-on-dark .CodeMirror-line > span > span::selection { background: rgba(221,240,255,0.2); }
.cm-s-pastel-on-dark .CodeMirror-line::-moz-selection, .cm-s-pastel-on-dark .CodeMirror-line > span::-moz-selection, .cm-s-pastel-on-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(221,240,255,0.2); }

.cm-s-pastel-on-dark .CodeMirror-gutters {
background: #34302f;
Expand Down
4 changes: 2 additions & 2 deletions theme/rubyblue.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.cm-s-rubyblue.CodeMirror { background: #112435; color: white; }
.cm-s-rubyblue div.CodeMirror-selected { background: #38566F !important; }
.cm-s-rubyblue.CodeMirror ::selection { background: rgba(56, 86, 111, 0.99); }
.cm-s-rubyblue.CodeMirror ::-moz-selection { background: rgba(56, 86, 111, 0.99); }
.cm-s-rubyblue .CodeMirror-line::selection, .cm-s-rubyblue .CodeMirror-line > span::selection, .cm-s-rubyblue .CodeMirror-line > span > span::selection { background: rgba(56, 86, 111, 0.99); }
.cm-s-rubyblue .CodeMirror-line::-moz-selection, .cm-s-rubyblue .CodeMirror-line > span::-moz-selection, .cm-s-rubyblue .CodeMirror-line > span > span::-moz-selection { background: rgba(56, 86, 111, 0.99); }
.cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; }
.cm-s-rubyblue .CodeMirror-guttermarker { color: white; }
.cm-s-rubyblue .CodeMirror-guttermarker-subtle { color: #3E7087; }
Expand Down
88 changes: 88 additions & 0 deletions theme/seti.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*

Name: seti
Author: Michael Kaminsky (http://github.com/mkaminsky11)

Original seti color scheme by Jesse Weed (https://github.com/jesseweed/seti-syntax)

*/


.cm-s-seti.CodeMirror {
background-color: #151718 !important;
color: #CFD2D1 !important;
border: none;
}
.cm-s-seti .CodeMirror-gutters{
color: #404b53;
background-color: #0E1112;
border: none;
}
.cm-s-seti .CodeMirror-cursor {
border-left: solid thin #f8f8f0 !important;
}
.cm-s-seti .CodeMirror-linenumber {
color: #6D8A88;
}
.cm-s-seti.CodeMirror-focused .CodeMirror-selected {
background: rgba(255, 255, 255, 0.10);
}
.cm-s-seti .CodeMirror-line::selection, .cm-s-seti .CodeMirror-line > span::selection, .cm-s-seti .CodeMirror-line > span > span::selection {
background: rgba(255, 255, 255, 0.10);
}
.cm-s-seti .CodeMirror-line::-moz-selection, .cm-s-seti .CodeMirror-line > span::-moz-selection, .cm-s-seti .CodeMirror-line > span > span::-moz-selection {
background: rgba(255, 255, 255, 0.10);
}
.cm-s-seti span.cm-comment {
color: #41535b;
}
.cm-s-seti span.cm-string, .cm-s-seti span.cm-string-2 {
color: #55b5db;
}
.cm-s-seti span.cm-number {
color: #cd3f45;
}
.cm-s-seti span.cm-variable {
color: #55b5db;
}
.cm-s-seti span.cm-variable-2 {
color: #a074c4;
}
.cm-s-seti span.cm-def {
color: #55b5db;
}
.cm-s-seti span.cm-keyword {
color: #ff79c6;
}
.cm-s-seti span.cm-operator {
color: #9fca56;
}
.cm-s-seti span.cm-keyword {
color: #e6cd69;
}
.cm-s-seti span.cm-atom {
color: #cd3f45;
}
.cm-s-seti span.cm-meta {
color: #55b5db;
}
.cm-s-seti span.cm-tag {
color: #55b5db;
}
.cm-s-seti span.cm-attribute {
color: #9fca56;
}
.cm-s-seti span.cm-qualifier {
color: #9fca56;
}
.cm-s-seti span.cm-property {
color: #a074c4;
}
.cm-s-seti span.cm-variable-3 {
color: #9fca56;
}
.cm-s-seti span.cm-builtin {
color: #9fca56;
}
.cm-s-seti .CodeMirror-activeline-background {background: #101213 !important;}
.cm-s-seti .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
6 changes: 3 additions & 3 deletions theme/solarized.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png

.cm-s-solarized.cm-s-dark .CodeMirror-selected { background: #073642; }
.cm-s-solarized.cm-s-dark.CodeMirror ::selection { background: rgba(7, 54, 66, 0.99); }
.cm-s-solarized.cm-s-dark.CodeMirror ::-moz-selection { background: rgba(7, 54, 66, 0.99); }
.cm-s-solarized.cm-s-dark .CodeMirror-line::-moz-selection, .cm-s-dark .CodeMirror-line > span::-moz-selection, .cm-s-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(7, 54, 66, 0.99); }

.cm-s-solarized.cm-s-light .CodeMirror-selected { background: #eee8d5; }
.cm-s-solarized.cm-s-light.CodeMirror ::selection { background: #eee8d5; }
.cm-s-solarized.cm-s-lightCodeMirror ::-moz-selection { background: #eee8d5; }
.cm-s-solarized.cm-s-light .CodeMirror-line::selection, .cm-s-light .CodeMirror-line > span::selection, .cm-s-light .CodeMirror-line > span > span::selection { background: #eee8d5; }
.cm-s-solarized.cm-s-light .CodeMirror-line::-moz-selection, .cm-s-ligh .CodeMirror-line > span::-moz-selection, .cm-s-ligh .CodeMirror-line > span > span::-moz-selection { background: #eee8d5; }

/* Editor styling */

Expand Down
4 changes: 2 additions & 2 deletions theme/the-matrix.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; }
.cm-s-the-matrix div.CodeMirror-selected { background: #2D2D2D !important; }
.cm-s-the-matrix.CodeMirror ::selection { background: rgba(45, 45, 45, 0.99); }
.cm-s-the-matrix.CodeMirror ::-moz-selection { background: rgba(45, 45, 45, 0.99); }
.cm-s-the-matrix .CodeMirror-line::selection, .cm-s-the-matrix .CodeMirror-line > span::selection, .cm-s-the-matrix .CodeMirror-line > span > span::selection { background: rgba(45, 45, 45, 0.99); }
.cm-s-the-matrix .CodeMirror-line::-moz-selection, .cm-s-the-matrix .CodeMirror-line > span::-moz-selection, .cm-s-the-matrix .CodeMirror-line > span > span::-moz-selection { background: rgba(45, 45, 45, 0.99); }
.cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; }
.cm-s-the-matrix .CodeMirror-guttermarker { color: #0f0; }
.cm-s-the-matrix .CodeMirror-guttermarker-subtle { color: white; }
Expand Down
4 changes: 2 additions & 2 deletions theme/tomorrow-night-eighties.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

.cm-s-tomorrow-night-eighties.CodeMirror {background: #000000; color: #CCCCCC;}
.cm-s-tomorrow-night-eighties div.CodeMirror-selected {background: #2D2D2D !important;}
.cm-s-tomorrow-night-eighties.CodeMirror ::selection { background: rgba(45, 45, 45, 0.99); }
.cm-s-tomorrow-night-eighties.CodeMirror ::-moz-selection { background: rgba(45, 45, 45, 0.99); }
.cm-s-tomorrow-night-eighties .CodeMirror-line::selection, .cm-s-tomorrow-night-eighties .CodeMirror-line > span::selection, .cm-s-tomorrow-night-eighties .CodeMirror-line > span > span::selection { background: rgba(45, 45, 45, 0.99); }
.cm-s-tomorrow-night-eighties .CodeMirror-line::-moz-selection, .cm-s-tomorrow-night-eighties .CodeMirror-line > span::-moz-selection, .cm-s-tomorrow-night-eighties .CodeMirror-line > span > span::-moz-selection { background: rgba(45, 45, 45, 0.99); }
.cm-s-tomorrow-night-eighties .CodeMirror-gutters {background: #000000; border-right: 0px;}
.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker { color: #f2777a; }
.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker-subtle { color: #777; }
Expand Down
4 changes: 2 additions & 2 deletions theme/twilight.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/
.cm-s-twilight .CodeMirror-selected { background: #323232 !important; } /**/
.cm-s-twilight.CodeMirror ::selection { background: rgba(50, 50, 50, 0.99); }
.cm-s-twilight.CodeMirror ::-moz-selection { background: rgba(50, 50, 50, 0.99); }
.cm-s-twilight .CodeMirror-line::selection, .cm-s-twilight .CodeMirror-line > span::selection, .cm-s-twilight .CodeMirror-line > span > span::selection { background: rgba(50, 50, 50, 0.99); }
.cm-s-twilight .CodeMirror-line::-moz-selection, .cm-s-twilight .CodeMirror-line > span::-moz-selection, .cm-s-twilight .CodeMirror-line > span > span::-moz-selection { background: rgba(50, 50, 50, 0.99); }

.cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; }
.cm-s-twilight .CodeMirror-guttermarker { color: white; }
Expand Down
4 changes: 2 additions & 2 deletions theme/vibrant-ink.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

.cm-s-vibrant-ink.CodeMirror { background: black; color: white; }
.cm-s-vibrant-ink .CodeMirror-selected { background: #35493c !important; }
.cm-s-vibrant-ink.CodeMirror ::selection { background: rgba(53, 73, 60, 0.99); }
.cm-s-vibrant-ink.CodeMirror ::-moz-selection { background: rgba(53, 73, 60, 0.99); }
.cm-s-vibrant-ink .CodeMirror-line::selection, .cm-s-vibrant-ink .CodeMirror-line > span::selection, .cm-s-vibrant-ink .CodeMirror-line > span > span::selection { background: rgba(53, 73, 60, 0.99); }
.cm-s-vibrant-ink .CodeMirror-line::-moz-selection, .cm-s-vibrant-ink .CodeMirror-line > span::-moz-selection, .cm-s-vibrant-ink .CodeMirror-line > span > span::-moz-selection { background: rgba(53, 73, 60, 0.99); }

.cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
.cm-s-vibrant-ink .CodeMirror-guttermarker { color: white; }
Expand Down
4 changes: 2 additions & 2 deletions theme/xq-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ THE SOFTWARE.
*/
.cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; }
.cm-s-xq-dark .CodeMirror-selected { background: #27007A !important; }
.cm-s-xq-dark.CodeMirror ::selection { background: rgba(39, 0, 122, 0.99); }
.cm-s-xq-dark.CodeMirror ::-moz-selection { background: rgba(39, 0, 122, 0.99); }
.cm-s-xq-dark .CodeMirror-line::selection, .cm-s-xq-dark .CodeMirror-line > span::selection, .cm-s-xq-dark .CodeMirror-line > span > span::selection { background: rgba(39, 0, 122, 0.99); }
.cm-s-xq-dark .CodeMirror-line::-moz-selection, .cm-s-xq-dark .CodeMirror-line > span::-moz-selection, .cm-s-xq-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(39, 0, 122, 0.99); }
.cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
.cm-s-xq-dark .CodeMirror-guttermarker { color: #FFBD40; }
.cm-s-xq-dark .CodeMirror-guttermarker-subtle { color: #f8f8f8; }
Expand Down
86 changes: 86 additions & 0 deletions theme/yeti.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*

Name: yeti
Author: Michael Kaminsky (http://github.com/mkaminsky11)

Original yeti color scheme by Jesse Weed (https://github.com/jesseweed/yeti-syntax)

*/


.cm-s-yeti.CodeMirror {
background-color: #ECEAE8 !important;
color: #d1c9c0 !important;
border: none;
}

.cm-s-yeti .CodeMirror-gutters{
color: #adaba6;
background-color: #E5E1DB;
border: none;
}
.cm-s-yeti .CodeMirror-cursor {
border-left: solid thin #d1c9c0 !important;
}
.cm-s-yeti .CodeMirror-linenumber {
color: #adaba6;
}
.cm-s-yeti.CodeMirror-focused .CodeMirror-selected {
background: #DCD8D2;
}
.cm-s-yeti .CodeMirror-line::selection, .cm-s-yeti .CodeMirror-line > span::selection, .cm-s-yeti .CodeMirror-line > span > span::selection {
background: #DCD8D2;
}
.cm-s-yeti .CodeMirror-line::-moz-selection, .cm-s-yeti .CodeMirror-line > span::-moz-selection, .cm-s-yeti .CodeMirror-line > span > span::-moz-selection {
background: #DCD8D2;
}
.cm-s-yeti span.cm-comment {
color: #d4c8be;
}
.cm-s-yeti span.cm-string, .cm-s-yeti span.cm-string-2 {
color: #96c0d8;
}
.cm-s-yeti span.cm-number {
color: #a074c4;
}
.cm-s-yeti span.cm-variable {
color: #55b5db;
}
.cm-s-yeti span.cm-variable-2 {
color: #a074c4;
}
.cm-s-yeti span.cm-def {
color: #55b5db;
}
.cm-s-yeti span.cm-operator {
color: #9fb96e;
}
.cm-s-yeti span.cm-keyword {
color: #9fb96e;
}
.cm-s-yeti span.cm-atom {
color:##a074c4;
}
.cm-s-yeti span.cm-meta {
color: #96c0d8;
}
.cm-s-yeti span.cm-tag {
color: #96c0d8;
}
.cm-s-yeti span.cm-attribute {
color: #9fb96e;
}
.cm-s-yeti span.cm-qualifier {
color: #96c0d8;
}
.cm-s-yeti span.cm-property {
color: #a074c4;
}
.cm-s-yeti span.cm-builtin {
color: #a074c4;
}
.cm-s-yeti span.cm-variable-3 {
color: #96c0d8;
}
.cm-s-yeti .CodeMirror-activeline-background {background: #E7E4E0 !important;}
.cm-s-yeti .CodeMirror-matchingbracket { text-decoration: underline;}