Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Organize add-on scripts into subdirectories

Closes #1133
  • Loading branch information...
commit eb2969fbc30ba58cbb81acdc9ca5fc0189c9d5e9 1 parent 7858e25
@marijnh marijnh authored
Showing with 132 additions and 119 deletions.
  1. 0  {lib/util → addon/dialog}/dialog.css
  2. 0  {lib/util → addon/dialog}/dialog.js
  3. 0  {lib/util → addon/edit}/closetag.js
  4. 0  {lib/util → addon/edit}/continuecomment.js
  5. 0  {lib/util → addon/edit}/continuelist.js
  6. 0  {lib/util → addon/edit}/matchbrackets.js
  7. 0  {lib/util → addon/fold}/collapserange.js
  8. 0  {lib/util → addon/fold}/foldcode.js
  9. 0  {lib/util → addon/format}/formatting.js
  10. 0  {lib/util → addon/hint}/javascript-hint.js
  11. 0  {lib/util → addon/hint}/pig-hint.js
  12. 0  {lib/util → addon/hint}/python-hint.js
  13. 0  {lib/util → addon/hint}/simple-hint.css
  14. 0  {lib/util → addon/hint}/simple-hint.js
  15. 0  {lib/util → addon/hint}/xml-hint.js
  16. 0  {lib/util → addon/mode}/loadmode.js
  17. 0  {lib/util → addon/mode}/multiplex.js
  18. 0  {lib/util → addon/mode}/overlay.js
  19. 0  {lib/util → addon/runmode}/colorize.js
  20. 0  lib/util/runmodeonly.js → addon/runmode/runmode-standalone.js
  21. 0  {lib/util → addon/runmode}/runmode.js
  22. 0  lib/util/runmode-standalone.js → addon/runmode/runmode.node.js
  23. 0  {lib/util → addon/search}/match-highlighter.js
  24. 0  {lib/util → addon/search}/search.js
  25. 0  {lib/util → addon/search}/searchcursor.js
  26. +2 −1  bin/compress
  27. +1 −1  demo/closetag.html
  28. +1 −1  demo/collapserange.html
  29. +5 −5 demo/complete.html
  30. +2 −2 demo/folding.html
  31. +1 −1  demo/formatting.html
  32. +1 −1  demo/loadmode.html
  33. +2 −2 demo/matchhighlighter.html
  34. +3 −3 demo/multiplex.html
  35. +2 −2 demo/mustache.html
  36. +2 −2 demo/runmode.html
  37. +8 −8 demo/search.html
  38. +3 −3 demo/vim.html
  39. +6 −6 demo/xmlcomplete.html
  40. +24 −17 doc/compress.html
  41. +35 −31 doc/manual.html
  42. +3 −3 doc/oldrelease.html
  43. +4 −4 doc/upgrade_v3.html
  44. +1 −1  index.html
  45. +1 −1  mode/clike/index.html
  46. +1 −1  mode/clike/scala.html
  47. +1 −1  mode/d/index.html
  48. +1 −1  mode/erlang/index.html
  49. +1 −1  mode/gfm/index.html
  50. +1 −1  mode/go/index.html
  51. +1 −1  mode/groovy/index.html
  52. +1 −1  mode/haskell/index.html
  53. +2 −2 mode/javascript/index.html
  54. +1 −1  mode/less/index.html
  55. +1 −1  mode/lua/index.html
  56. +1 −1  mode/markdown/index.html
  57. +1 −1  mode/ocaml/index.html
  58. +1 −1  mode/php/index.html
  59. +1 −1  mode/python/index.html
  60. +1 −1  mode/ruby/index.html
  61. +1 −1  mode/sass/index.html
  62. +1 −1  mode/shell/index.html
  63. +1 −1  mode/smalltalk/index.html
  64. +1 −1  mode/sparql/index.html
  65. +1 −1  mode/tiddlywiki/index.html
  66. +1 −1  mode/vb/index.html
  67. +2 −2 test/index.html
  68. +1 −0  test/run.js
View
0  lib/util/dialog.css → addon/dialog/dialog.css
File renamed without changes
View
0  lib/util/dialog.js → addon/dialog/dialog.js
File renamed without changes
View
0  lib/util/closetag.js → addon/edit/closetag.js
File renamed without changes
View
0  lib/util/continuecomment.js → addon/edit/continuecomment.js
File renamed without changes
View
0  lib/util/continuelist.js → addon/edit/continuelist.js
File renamed without changes
View
0  lib/util/matchbrackets.js → addon/edit/matchbrackets.js
File renamed without changes
View
0  lib/util/collapserange.js → addon/fold/collapserange.js
File renamed without changes
View
0  lib/util/foldcode.js → addon/fold/foldcode.js
File renamed without changes
View
0  lib/util/formatting.js → addon/format/formatting.js
File renamed without changes
View
0  lib/util/javascript-hint.js → addon/hint/javascript-hint.js
File renamed without changes
View
0  lib/util/pig-hint.js → addon/hint/pig-hint.js
File renamed without changes
View
0  lib/util/python-hint.js → addon/hint/python-hint.js
File renamed without changes
View
0  lib/util/simple-hint.css → addon/hint/simple-hint.css
File renamed without changes
View
0  lib/util/simple-hint.js → addon/hint/simple-hint.js
File renamed without changes
View
0  lib/util/xml-hint.js → addon/hint/xml-hint.js
File renamed without changes
View
0  lib/util/loadmode.js → addon/mode/loadmode.js
File renamed without changes
View
0  lib/util/multiplex.js → addon/mode/multiplex.js
File renamed without changes
View
0  lib/util/overlay.js → addon/mode/overlay.js
File renamed without changes
View
0  lib/util/colorize.js → addon/runmode/colorize.js
File renamed without changes
View
0  lib/util/runmodeonly.js → addon/runmode/runmode-standalone.js
File renamed without changes
View
0  lib/util/runmode.js → addon/runmode/runmode.js
File renamed without changes
View
0  lib/util/runmode-standalone.js → addon/runmode/runmode.node.js
File renamed without changes
View
0  lib/util/match-highlighter.js → addon/search/match-highlighter.js
File renamed without changes
View
0  lib/util/search.js → addon/search/search.js
File renamed without changes
View
0  lib/util/searchcursor.js → addon/search/searchcursor.js
File renamed without changes
View
3  bin/compress
@@ -6,7 +6,7 @@
//
// bin/compress codemirror runmode javascript xml
//
-// Will take lib/codemirror.js, lib/util/runmode.js,
+// Will take lib/codemirror.js, addon/runmode/runmode.js,
// mode/javascript/javascript.js, and mode/xml/xml.js, run them though
// the online minifier at http://marijnhaverbeke.nl/uglifyjs, and spit
// out the result.
@@ -61,6 +61,7 @@ function walk(dir) {
}
walk("lib/");
+walk("addon/");
walk("mode/");
if (!blob) help(false);
View
2  demo/closetag.html
@@ -5,7 +5,7 @@
<title>CodeMirror: Close-Tag Demo</title>
<link rel="stylesheet" href="../lib/codemirror.css">
<script src="../lib/codemirror.js"></script>
- <script src="../lib/util/closetag.js"></script>
+ <script src="../addon/edit/closetag.js"></script>
<script src="../mode/xml/xml.js"></script>
<script src="../mode/javascript/javascript.js"></script>
<script src="../mode/css/css.js"></script>
View
2  demo/collapserange.html
@@ -5,7 +5,7 @@
<title>CodeMirror: Range Collapsing Demo</title>
<link rel="stylesheet" href="../lib/codemirror.css">
<script src="../lib/codemirror.js"></script>
- <script src="../lib/util/collapserange.js"></script>
+ <script src="../addon/fold/collapserange.js"></script>
<script src="../mode/javascript/javascript.js"></script>
<link rel="stylesheet" href="../doc/docs.css">
View
10 demo/complete.html
@@ -5,9 +5,9 @@
<title>CodeMirror: Autocomplete Demo</title>
<link rel="stylesheet" href="../lib/codemirror.css">
<script src="../lib/codemirror.js"></script>
- <script src="../lib/util/simple-hint.js"></script>
- <link rel="stylesheet" href="../lib/util/simple-hint.css">
- <script src="../lib/util/javascript-hint.js"></script>
+ <script src="../addon/hint/simple-hint.js"></script>
+ <link rel="stylesheet" href="../addon/hint/simple-hint.css">
+ <script src="../addon/hint/javascript-hint.js"></script>
<script src="../mode/javascript/javascript.js"></script>
<link rel="stylesheet" href="../doc/docs.css">
</head>
@@ -53,8 +53,8 @@
</textarea></form>
<p>Press <strong>ctrl-space</strong> to activate autocompletion. See
-the code (<a href="../lib/util/simple-hint.js">here</a>
-and <a href="../lib/util/javascript-hint.js">here</a>) to figure out
+the code (<a href="../addon/hint/simple-hint.js">here</a>
+and <a href="../addon/hint/javascript-hint.js">here</a>) to figure out
how it works.</p>
<script>
View
4 demo/folding.html
@@ -5,7 +5,7 @@
<title>CodeMirror: Code Folding Demo</title>
<link rel="stylesheet" href="../lib/codemirror.css">
<script src="../lib/codemirror.js"></script>
- <script src="../lib/util/foldcode.js"></script>
+ <script src="../addon/fold/foldcode.js"></script>
<script src="../mode/javascript/javascript.js"></script>
<script src="../mode/xml/xml.js"></script>
<link rel="stylesheet" href="../doc/docs.css">
@@ -25,7 +25,7 @@
<h1>CodeMirror: Code Folding Demo</h1>
<p>Demonstration of code folding using the code
- in <a href="../lib/util/foldcode.js"><code>foldcode.js</code></a>.
+ in <a href="../addon/fold/foldcode.js"><code>foldcode.js</code></a>.
Press ctrl-q or click on the gutter to fold a block, again
to unfold.<br>Try the <a href="collapserange.html">Range Colapse demo</a> as well.</p>
<form>
View
2  demo/formatting.html
@@ -5,7 +5,7 @@
<title>CodeMirror: Formatting Demo</title>
<link rel="stylesheet" href="../lib/codemirror.css">
<script src="../lib/codemirror.js"></script>
- <script src="../lib/util/formatting.js"></script>
+ <script src="../addon/format/formatting.js"></script>
<script src="../mode/css/css.js"></script>
<script src="../mode/xml/xml.js"></script>
<script src="../mode/javascript/javascript.js"></script>
View
2  demo/loadmode.html
@@ -5,7 +5,7 @@
<title>CodeMirror: Lazy Mode Loading Demo</title>
<link rel="stylesheet" href="../lib/codemirror.css">
<script src="../lib/codemirror.js"></script>
- <script src="../lib/util/loadmode.js"></script>
+ <script src="../addon/mode/loadmode.js"></script>
<link rel="stylesheet" href="../doc/docs.css">
<style type="text/css">
View
4 demo/matchhighlighter.html
@@ -5,8 +5,8 @@
<title>CodeMirror: Match Highlighter Demo</title>
<link rel="stylesheet" href="../lib/codemirror.css">
<script src="../lib/codemirror.js"></script>
- <script src="../lib/util/searchcursor.js"></script>
- <script src="../lib/util/match-highlighter.js"></script>
+ <script src="../addon/search/searchcursor.js"></script>
+ <script src="../addon/search/match-highlighter.js"></script>
<link rel="stylesheet" href="../doc/docs.css">
<style type="text/css">
View
6 demo/multiplex.html
@@ -5,7 +5,7 @@
<title>CodeMirror: Multiplexing Parser Demo</title>
<link rel="stylesheet" href="../lib/codemirror.css">
<script src="../lib/codemirror.js"></script>
- <script src="../lib/util/multiplex.js"></script>
+ <script src="../addon/mode/multiplex.js"></script>
<script src="../mode/xml/xml.js"></script>
<link rel="stylesheet" href="../doc/docs.css">
@@ -52,8 +52,8 @@
boundary strings, switches to one or more inner modes. The out
(HTML) mode does not get fed the content of the <code>&lt;&lt;
>></code> blocks. See
- the <a href="../doc/manual.html#util_multiplex">manual</a> and
- the <a href="../lib/util/multiplex.js">source</a> for more
+ the <a href="../doc/manual.html#addon_multiplex">manual</a> and
+ the <a href="../addon/mode/multiplex.js">source</a> for more
information.</p>
</body>
View
4 demo/mustache.html
@@ -5,7 +5,7 @@
<title>CodeMirror: Overlay Parser Demo</title>
<link rel="stylesheet" href="../lib/codemirror.css">
<script src="../lib/codemirror.js"></script>
- <script src="../lib/util/overlay.js"></script>
+ <script src="../addon/mode/overlay.js"></script>
<script src="../mode/xml/xml.js"></script>
<link rel="stylesheet" href="../doc/docs.css">
@@ -52,7 +52,7 @@
<p>Demonstration of a mode that parses HTML, highlighting
the <a href="http://mustache.github.com/">Mustache</a> templating
directives inside of it by using the code
- in <a href="../lib/util/overlay.js"><code>overlay.js</code></a>. View
+ in <a href="../addon/mode/overlay.js"><code>overlay.js</code></a>. View
source to see the 15 lines of code needed to accomplish this.</p>
</body>
View
4 demo/runmode.html
@@ -5,7 +5,7 @@
<title>CodeMirror: Mode Runner Demo</title>
<link rel="stylesheet" href="../lib/codemirror.css">
<script src="../lib/codemirror.js"></script>
- <script src="../lib/util/runmode.js"></script>
+ <script src="../addon/runmode/runmode.js"></script>
<script src="../mode/xml/xml.js"></script>
<link rel="stylesheet" href="../doc/docs.css">
</head>
@@ -30,7 +30,7 @@
<p>Running a CodeMirror mode outside of the editor.
The <code>CodeMirror.runMode</code> function, defined
- in <code><a href="../lib/util/runmode.js">lib/runmode.js</a></code> takes the following arguments:</p>
+ in <code><a href="../addon/runmode/runmode.js">lib/runmode.js</a></code> takes the following arguments:</p>
<dl>
<dt><code>text (string)</code></dt>
View
16 demo/search.html
@@ -6,10 +6,10 @@
<link rel="stylesheet" href="../lib/codemirror.css">
<script src="../lib/codemirror.js"></script>
<script src="../mode/xml/xml.js"></script>
- <script src="../lib/util/dialog.js"></script>
- <link rel="stylesheet" href="../lib/util/dialog.css">
- <script src="../lib/util/searchcursor.js"></script>
- <script src="../lib/util/search.js"></script>
+ <script src="../addon/dialog/dialog.js"></script>
+ <link rel="stylesheet" href="../addon/dialog/dialog.css">
+ <script src="../addon/search/searchcursor.js"></script>
+ <script src="../addon/search/search.js"></script>
<link rel="stylesheet" href="../doc/docs.css">
<style type="text/css">
@@ -76,10 +76,10 @@
<dt>Shift-Ctrl-R / Shift-Cmd-Option-F</dt><dd>Replace all</dd>
</dl>
<p>Searching is enabled by
- including <a href="../lib/util/search.js">lib/util/search.js</a>
- and <a href="../lib/util/searchcursor.js">lib/util/searchcursor.js</a>.
+ including <a href="../addon/search/search.js">addon/search/search.js</a>
+ and <a href="../addon/search/searchcursor.js">addon/search/searchcursor.js</a>.
For good-looking input dialogs, you also want to include
- <a href="../lib/util/dialog.js">lib/util/dialog.js</a>
- and <a href="../lib/util/dialog.css">lib/util/dialog.css</a>.</p>
+ <a href="../addon/dialog/dialog.js">addon/dialog/dialog.js</a>
+ and <a href="../addon/dialog/dialog.css">addon/dialog/dialog.css</a>.</p>
</body>
</html>
View
6 demo/vim.html
@@ -5,12 +5,12 @@
<title>CodeMirror: Vim bindings demo</title>
<link rel="stylesheet" href="../lib/codemirror.css">
<script src="../lib/codemirror.js"></script>
- <script src="../lib/util/dialog.js"></script>
- <script src="../lib/util/searchcursor.js"></script>
+ <script src="../addon/dialog/dialog.js"></script>
+ <script src="../addon/search/searchcursor.js"></script>
<script src="../mode/clike/clike.js"></script>
<script src="../keymap/vim.js"></script>
<link rel="stylesheet" href="../doc/docs.css">
- <link rel="stylesheet" href="../lib/util/dialog.css">
+ <link rel="stylesheet" href="../addon/dialog/dialog.css">
<style type="text/css">
.CodeMirror {border-top: 1px solid #eee; border-bottom: 1px solid #eee;}
View
12 demo/xmlcomplete.html
@@ -5,10 +5,10 @@
<title>CodeMirror: XML Autocomplete Demo</title>
<link rel="stylesheet" href="../lib/codemirror.css">
<script src="../lib/codemirror.js"></script>
- <script src="../lib/util/simple-hint.js"></script>
- <link rel="stylesheet" href="../lib/util/simple-hint.css">
- <script src="../lib/util/closetag.js"></script>
- <script src="../lib/util/xml-hint.js"></script>
+ <script src="../addon/hint/simple-hint.js"></script>
+ <link rel="stylesheet" href="../addon/hint/simple-hint.css">
+ <script src="../addon/edit/closetag.js"></script>
+ <script src="../addon/hint/xml-hint.js"></script>
<script src="../mode/xml/xml.js"></script>
<link rel="stylesheet" href="../doc/docs.css">
<style type="text/css">
@@ -23,8 +23,8 @@
<p>Type '&lt;' or space inside tag or
press <strong>ctrl-space</strong> to activate autocompletion. See
- the code (<a href="../lib/util/simple-hint.js">here</a>
- and <a href="../lib/util/xml-hint.js">here</a>) to figure out how
+ the code (<a href="../addon/hint/simple-hint.js">here</a>
+ and <a href="../addon/hint/xml-hint.js">here</a>) to figure out how
it works.</p>
<script>
View
41 doc/compress.html
@@ -127,23 +127,30 @@
<option value="http://codemirror.net/mode/yaml/yaml.js">yaml.js</option>
<option value="http://codemirror.net/mode/z80/z80.js">z80.js</option>
</optgroup>
- <optgroup label="Utilities and add-ons">
- <option value="http://codemirror.net/lib/util/overlay.js">overlay.js</option>
- <option value="http://codemirror.net/lib/util/multiplex.js">multiplex.js</option>
- <option value="http://codemirror.net/lib/util/runmode.js">runmode.js</option>
- <option value="http://codemirror.net/lib/util/simple-hint.js">simple-hint.js</option>
- <option value="http://codemirror.net/lib/util/javascript-hint.js">javascript-hint.js</option>
- <option value="http://codemirror.net/lib/util/xml-hint.js">xml-hint.js</option>
- <option value="http://codemirror.net/lib/util/python-hint.js">python-hint.js</option>
- <option value="http://codemirror.net/lib/util/foldcode.js">foldcode.js</option>
- <option value="http://codemirror.net/lib/util/dialog.js">dialog.js</option>
- <option value="http://codemirror.net/lib/util/search.js">search.js</option>
- <option value="http://codemirror.net/lib/util/searchcursor.js">searchcursor.js</option>
- <option value="http://codemirror.net/lib/util/matchbrackets.js">matchbrackets.js</option>
- <option value="http://codemirror.net/lib/util/formatting.js">formatting.js</option>
- <option value="http://codemirror.net/lib/util/match-highlighter.js">match-highlighter.js</option>
- <option value="http://codemirror.net/lib/util/closetag.js">closetag.js</option>
- <option value="http://codemirror.net/lib/util/loadmode.js">loadmode.js</option>
+ <optgroup label="Add-ons">
+ <option value="http://codemirror.net/addon/dialog/dialog.js">dialog.js</option>
+ <option value="http://codemirror.net/addon/edit/closetag.js">closetag.js</option>
+ <option value="http://codemirror.net/addon/edit/continuecomment.js">continuecomment.js</option>
+ <option value="http://codemirror.net/addon/edit/continuelist.js">continuelist.js</option>
+ <option value="http://codemirror.net/addon/edit/matchbrackets.js">matchbrackets.js</option>
+ <option value="http://codemirror.net/addon/fold/foldcode.js">foldcode.js</option>
+ <option value="http://codemirror.net/addon/fold/collapserange.js">collapserange.js</option>
+ <option value="http://codemirror.net/addon/format/formatting.js">formatting.js</option>
+ <option value="http://codemirror.net/addon/hint/simple-hint.js">simple-hint.js</option>
+ <option value="http://codemirror.net/addon/hint/javascript-hint.js">javascript-hint.js</option>
+ <option value="http://codemirror.net/addon/hint/xml-hint.js">xml-hint.js</option>
+ <option value="http://codemirror.net/addon/hint/pig-hint.js">pig-hint.js</option>
+ <option value="http://codemirror.net/addon/hint/python-hint.js">python-hint.js</option>
+ <option value="http://codemirror.net/addon/mode/loadmode.js">loadmode.js</option>
+ <option value="http://codemirror.net/addon/mode/overlay.js">overlay.js</option>
+ <option value="http://codemirror.net/addon/mode/multiplex.js">multiplex.js</option>
+ <option value="http://codemirror.net/addon/runmode/colorize.js">colorize.js</option>
+ <option value="http://codemirror.net/addon/runmode/runmode.js">runmode.js</option>
+ <option value="http://codemirror.net/addon/runmode/runmode-standalone.js">runmode-standalone.js</option>
+ <option value="http://codemirror.net/addon/runmode/runmode.node.js">runmode.node.js</option>
+ <option value="http://codemirror.net/addon/search/search.js">search.js</option>
+ <option value="http://codemirror.net/addon/search/searchcursor.js">searchcursor.js</option>
+ <option value="http://codemirror.net/addon/search/match-highlighter.js">match-highlighter.js</option>
</optgroup>
<optgroup label="Keymaps">
<option value="http://codemirror.net/keymap/emacs.js">emacs.js</option>
View
66 doc/manual.html
@@ -8,8 +8,8 @@
<style>dl dl {margin: 0;}</style>
<script src="../lib/codemirror.js"></script>
<link rel="stylesheet" href="../lib/codemirror.css">
- <script src="../lib/util/runmode.js"></script>
- <script src="../lib/util/colorize.js"></script>
+ <script src="../addon/runmode/runmode.js"></script>
+ <script src="../addon/runmode/colorize.js"></script>
<script src="../mode/javascript/javascript.js"></script>
<script src="../mode/xml/xml.js"></script>
<script src="../mode/css/css.js"></script>
@@ -1103,19 +1103,19 @@ <h2 id="api">Programming API</h2>
<h2 id="addons">Add-ons</h2>
- <p>The <code>lib/util</code> directory in the distribution
- contains a number of reusable components that implement extra
- editor functionality. In brief, they are:</p>
+ <p>The <code>addon</code> directory in the distribution contains a
+ number of reusable components that implement extra editor
+ functionality. In brief, they are:</p>
<dl>
- <dt id="util_dialog"><a href="../lib/util/dialog.js"><code>dialog.js</code></a></dt>
+ <dt id="addon_dialog"><a href="../addon/dialog/dialog.js"><code>dialog.js</code></a></dt>
<dd>Provides a very simple way to query users for text input.
Adds an <code>openDialog</code> method to CodeMirror instances,
which can be called with an HTML fragment that provides the
prompt (should include an <code>input</code> tag), and a
callback function that is called when text has been entered.
- Depends on <code>lib/util/dialog.css</code>.</dd>
- <dt id="util_searchcursor"><a href="../lib/util/searchcursor.js"><code>searchcursor.js</code></a></dt>
+ Depends on <code>addon/dialog/dialog.css</code>.</dd>
+ <dt id="addon_searchcursor"><a href="../addon/search/searchcursor.js"><code>searchcursor.js</code></a></dt>
<dd>Adds the <code>getSearchCursor(query, start, caseFold) →
cursor</code> method to CodeMirror instances, which can be used
to implement search/replace functionality. <code>query</code>
@@ -1144,14 +1144,14 @@ <h2 id="addons">Add-ons</h2>
replacement.</dd>
</dl></dd>
- <dt id="util_search"><a href="../lib/util/search.js"><code>search.js</code></a></dt>
+ <dt id="addon_search"><a href="../addon/search/search.js"><code>search.js</code></a></dt>
<dd>Implements the search commands. CodeMirror has keys bound to
these by default, but will not do anything with them unless an
implementation is provided. Depends
on <code>searchcursor.js</code>, and will make use
- of <a href="#util_dialog"><code>openDialog</code></a> when
+ of <a href="#addon_dialog"><code>openDialog</code></a> when
available to make prompting for search queries less ugly.</dd>
- <dt id="util_matchbrackets"><a href="../lib/util/matchbrackets.js"><code>matchbrackets.js</code></a></dt>
+ <dt id="addon_matchbrackets"><a href="../addon/edit/matchbrackets.js"><code>matchbrackets.js</code></a></dt>
<dd>Defines an option <code>matchBrackets</code> which, when set
to true, causes matching brackets to be highlighted whenever the
cursor is next to them. It also adds a
@@ -1159,7 +1159,7 @@ <h2 id="addons">Add-ons</h2>
once, and a method <code>findMatchingBracket</code> that can be
used to run the bracket-finding algorithm that this uses
internally.</dd>
- <dt id="util_foldcode"><a href="../lib/util/foldcode.js"><code>foldcode.js</code></a></dt>
+ <dt id="addon_foldcode"><a href="../addon/fold/foldcode.js"><code>foldcode.js</code></a></dt>
<dd>Helps with code folding.
See <a href="../demo/folding.html">the demo</a> for an example.
Call <code>CodeMirror.newFoldFunction</code> with a range-finder
@@ -1175,17 +1175,21 @@ <h2 id="addons">Add-ons</h2>
where indentation determines block structure (Python, Haskell),
and <code>CodeMirror.tagRangeFinder</code>, for XML-style
languages.</dd>
- <dt id="util_collapserange"><a href="../lib/util/collapserange.js"><code>collapserange.js</code></a></dt>
+ <dt id="addon_collapserange"><a href="../addon/fold/collapserange.js"><code>collapserange.js</code></a></dt>
<dd>Another approach to
folding. <a href="../demo/collapserange.html">See demo</a>.
Allows the user to select a range to fold by clicking in the
gutter.</dd>
- <dt id="util_runmode"><a href="../lib/util/runmode.js"><code>runmode.js</code></a></dt>
+ <dt id="addon_runmode"><a href="../addon/runmode/runmode.js"><code>runmode.js</code></a></dt>
<dd>Can be used to run a CodeMirror mode over text without
actually opening an editor instance.
- See <a href="../demo/runmode.html">the demo</a> for an
- example.</dd>
- <dt id="util_overlay"><a href="../lib/util/overlay.js"><code>overlay.js</code></a></dt>
+ See <a href="../demo/runmode.html">the demo</a> for an example.
+ There alternate version of the file avaible for
+ running <a href="../addon/runmode/runmode-standalone.js">stand-alone</a>
+ (without including all of CodeMirror) and
+ for <a href="../addon/runmode/runmode.node.js">running under
+ node.js</a>.</dd>
+ <dt id="addon_overlay"><a href="../addon/mode/overlay.js"><code>overlay.js</code></a></dt>
<dd>Mode combinator that can be used to extend a mode with an
'overlay' — a secondary mode is run over the stream, along with
the base mode, and can color specific pieces of text without
@@ -1193,7 +1197,7 @@ <h2 id="addons">Add-ons</h2>
Defines <code>CodeMirror.overlayMode</code>, which is used to
create such a mode. See <a href="../demo/mustache.html">this
demo</a> for a detailed example.</dd>
- <dt id="util_multiplex"><a href="../lib/util/multiplex.js"><code>multiplex.js</code></a></dt>
+ <dt id="addon_multiplex"><a href="../addon/mode/multiplex.js"><code>multiplex.js</code></a></dt>
<dd>Mode combinator that can be used to easily 'multiplex'
between several modes.
Defines <code>CodeMirror.multiplexingMode</code> which, when
@@ -1212,7 +1216,7 @@ <h2 id="addons">Add-ons</h2>
see the content between the delimiters.
See <a href="../demo/multiplex.html">this demo</a> for an
example.</dd>
- <dt id="util_simple-hint"><a href="../lib/util/simple-hint.js"><code>simple-hint.js</code></a></dt>
+ <dt id="addon_simple-hint"><a href="../addon/hint/simple-hint.js"><code>simple-hint.js</code></a></dt>
<dd>Provides a framework for showing autocompletion hints.
Defines <code>CodeMirror.simpleHint</code>, which takes a
CodeMirror instance and a hinting function, and pops up a widget
@@ -1222,36 +1226,36 @@ <h2 id="addons">Add-ons</h2>
is an array of strings (the completions), and <code>from</code>
and <code>to</code> give the start and end of the token that is
being completed. Depends
- on <code>lib/util/simple-hint.css</code>.</dd>
- <dt id="util_javascript-hint"><a href="../lib/util/javascript-hint.js"><code>javascript-hint.js</code></a></dt>
+ on <code>addon/hint/simple-hint.css</code>.</dd>
+ <dt id="addon_javascript-hint"><a href="../addon/hint/javascript-hint.js"><code>javascript-hint.js</code></a></dt>
<dd>Defines <code>CodeMirror.javascriptHint</code>
and <code>CodeMirror.coffeescriptHint</code>, which are simple
hinting functions for the JavaScript and CoffeeScript
modes.</dd>
- <dt id="util_xml-hint"><a href="../lib/util/xml-hint.js"><code>xml-hint.js</code></a></dt>
+ <dt id="addon_xml-hint"><a href="../addon/hint/xml-hint.js"><code>xml-hint.js</code></a></dt>
<dd>Defines <code>CodeMirror.xmlHint</code>, a hinting function
for XML (which requires a schema to be defined).</dd>
- <dt id="util_python-hint"><a href="../lib/util/python-hint.js"><code>python-hint.js</code></a></dt>
+ <dt id="addon_python-hint"><a href="../addon/hint/python-hint.js"><code>python-hint.js</code></a></dt>
<dd>Defines <code>CodeMirror.pythonHint</code>, a hinter for Python code.</dd>
- <dt id="util_match-highlighter"><a href="../lib/util/match-highlighter.js"><code>match-highlighter.js</code></a></dt>
+ <dt id="addon_match-highlighter"><a href="../addon/search/match-highlighter.js"><code>match-highlighter.js</code></a></dt>
<dd>Adds a <code>matchHighlight</code> method to CodeMirror
instances that can be called (typically from
a <a href="#event_cursorActivity"><code>cursorActivity</code></a>
handler) to highlight all instances of a currently selected word
with the a classname given as a first argument to the method.
Depends on
- the <a href="#util_searchcursor"><code>searchcursor</code></a>
+ the <a href="#addon_searchcursor"><code>searchcursor</code></a>
add-on. Demo <a href="../demo/matchhighlighter.html">here</a>.</dd>
- <dt id="util_formatting"><a href="../lib/util/formatting.js"><code>formatting.js</code></a></dt>
+ <dt id="addon_formatting"><a href="../addon/format/formatting.js"><code>formatting.js</code></a></dt>
<dd>Adds <code>commentRange</code>, <code>autoIndentRange</code>,
and <code>autoFormatRange</code> methods that, respectively,
comment (or uncomment), indent, or format (add line breaks) a
range of code. <a href="../demo/formatting.html">Demo here.</a></dd>
- <dt id="util_closetag"><a href="../lib/util/closetag.js"><code>closetag.js</code></a></dt>
+ <dt id="addon_closetag"><a href="../addon/edit/closetag.js"><code>closetag.js</code></a></dt>
<dd>Provides utility functions for adding automatic tag closing
to XML modes. See
the <a href="../demo/closetag.html">demo</a>.</dd>
- <dt id="util_loadmode"><a href="../lib/util/loadmode.js"><code>loadmode.js</code></a></dt>
+ <dt id="addon_loadmode"><a href="../addon/mode/loadmode.js"><code>loadmode.js</code></a></dt>
<dd>Defines a <code>CodeMirror.requireMode(modename,
callback)</code> function that will try to load a given mode and
call the callback when it succeeded. You'll have to
@@ -1263,7 +1267,7 @@ <h2 id="addons">Add-ons</h2>
which will ensure the given mode is loaded and cause the given
editor instance to refresh its mode when the loading
succeeded. See the <a href="../demo/loadmode.html">demo</a>.</dd>
- <dt id="util_continuecomment"><a href="../lib/util/continuecomment.js"><code>continuecomment.js</code></a></dt>
+ <dt id="addon_continuecomment"><a href="../addon/edit/continuecomment.js"><code>continuecomment.js</code></a></dt>
<dd>Adds a <a href="#commands">command</a>
called <code>newlineAndIndentContinueComment</code> that you can
bind <code>Enter</code> to in order to have the editor prefix
@@ -1456,8 +1460,8 @@ <h2 id="modeapi">Writing CodeMirror Modes</h2>
extra methods, <code>innerMode</code> which, given a state object,
returns a <code>{state, mode}</code> object with the inner mode
and its state for the current position. These are used by utility
- scripts such as the <a href="#util_formatting">autoformatter</a>
- and the <a href="#util_closetag">tag closer</a> to get context
+ scripts such as the <a href="#addon_formatting">autoformatter</a>
+ and the <a href="#addon_closetag">tag closer</a> to get context
information. Use the <code>CodeMirror.innerMode</code> helper
function to, starting from a mode and a state, recursively walk
down to the innermost mode and state.</p>
View
6 doc/oldrelease.html
@@ -91,8 +91,8 @@
<li>Add <a href="manual.html#option_autoClearEmptyLines"><code>autoClearEmptyLines</code></a> option.</li>
<li>Properly use tab stops when rendering tabs.</li>
<li>Make PHP mode more robust.</li>
- <li>Support indentation blocks in <a href="manual.html#util_foldcode">code folder</a>.</li>
- <li>Add a script for <a href="manual.html#util_match-highlighter">highlighting instances of the selection</a>.</li>
+ <li>Support indentation blocks in <a href="manual.html#addon_foldcode">code folder</a>.</li>
+ <li>Add a script for <a href="manual.html#addon_match-highlighter">highlighting instances of the selection</a>.</li>
<li>New <a href="../mode/properties/index.html">.properties</a> mode.</li>
<li>Fix many bugs.</li>
</ul>
@@ -148,7 +148,7 @@
and <a href="../theme/rubyblue.css">Rubyblue</a> themes.</li>
<li>Add <a href="manual.html#setBookmark"><code>setBookmark</code></a> method.</li>
<li>Move some of the demo code into reusable components
- under <a href="../lib/util/"><code>lib/util</code></a>.</li>
+ under <a href="../addon/"><code>lib/util</code></a>.</li>
<li>Make screen-coord-finding code faster and more reliable.</li>
<li>Fix drag-and-drop in Firefox.</li>
<li>Improve support for IME.</li>
View
8 doc/upgrade_v3.html
@@ -7,8 +7,8 @@
<link rel="stylesheet" type="text/css" href="docs.css"/>
<script src="../lib/codemirror.js"></script>
<link rel="stylesheet" href="../lib/codemirror.css">
- <script src="../lib/util/runmode.js"></script>
- <script src="../lib/util/colorize.js"></script>
+ <script src="../addon/runmode/runmode.js"></script>
+ <script src="../addon/runmode/colorize.js"></script>
<script src="../mode/javascript/javascript.js"></script>
<script src="../mode/xml/xml.js"></script>
<script src="../mode/css/css.js"></script>
@@ -174,9 +174,9 @@ <h2 id=positions>Position properties</h2>
<h2 id=matchbrackets>Bracket matching no longer in core</h2>
-<p>The <a href="manual.html#util_matchbrackets"><code>matchBrackets</code></a>
+<p>The <a href="manual.html#addon_matchbrackets"><code>matchBrackets</code></a>
option is no longer defined in the core editor.
-Load <code>lib/util/matchbrackets.js</code> to enable it.</p>
+Load <code>addon/edit/matchbrackets.js</code> to enable it.</p>
<h2 id=modes>Mode management</h2>
View
2  index.html
@@ -329,7 +329,7 @@ <h2 id=releases>Releases</h2>
<li>Add <a href="doc/manual.html#defaultTextHeight"><code>defaultTextHeight</code></a> method.</li>
<li>Various extensions to the vim keymap.</li>
<li>Make <a href="mode/php/index.html">PHP mode</a> build on <a href="mode/htmlmixed/index.html">mixed HTML mode</a>.</li>
- <li>Add <a href="doc/manual.html#util_continuecomment">comment-continuing</a> add-on.</li>
+ <li>Add <a href="doc/manual.html#addon_continuecomment">comment-continuing</a> add-on.</li>
<li>Full <a href="https://github.com/marijnh/CodeMirror/compare/v2.35...v2.36">list of patches</a>.</li>
</ul>
View
2  mode/clike/index.html
@@ -5,7 +5,7 @@
<title>CodeMirror: C-like mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/matchbrackets.js"></script>
+ <script src="../../addon/edit/matchbrackets.js"></script>
<script src="clike.js"></script>
<link rel="stylesheet" href="../../doc/docs.css">
<style>.CodeMirror {border: 2px inset #dee;}</style>
View
2  mode/clike/scala.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../../lib/codemirror.css">
<link rel="stylesheet" href="../../theme/ambiance.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/matchbrackets.js"></script>
+ <script src="../../addon/edit/matchbrackets.js"></script>
<script src="clike.js"></script>
<link rel="stylesheet" href="../../doc/docs.css">
<style>
View
2  mode/d/index.html
@@ -5,7 +5,7 @@
<title>CodeMirror: D mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/matchbrackets.js"></script>
+ <script src="../../addon/edit/matchbrackets.js"></script>
<script src="d.js"></script>
<link rel="stylesheet" href="../../doc/docs.css">
<style>.CodeMirror {border: 2px inset #dee;}</style>
View
2  mode/erlang/index.html
@@ -5,7 +5,7 @@
<title>CodeMirror: Erlang mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/matchbrackets.js"></script>
+ <script src="../../addon/edit/matchbrackets.js"></script>
<script src="erlang.js"></script>
<link rel="stylesheet" href="../../theme/erlang-dark.css">
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
View
2  mode/gfm/index.html
@@ -5,7 +5,7 @@
<title>CodeMirror: GFM mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/overlay.js"></script>
+ <script src="../../addon/mode/overlay.js"></script>
<script src="../xml/xml.js"></script>
<script src="../markdown/markdown.js"></script>
<script src="gfm.js"></script>
View
2  mode/go/index.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" href="../../lib/codemirror.css">
<link rel="stylesheet" href="../../theme/elegant.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/matchbrackets.js"></script>
+ <script src="../../addon/edit/matchbrackets.js"></script>
<script src="go.js"></script>
<link rel="stylesheet" href="../../doc/docs.css">
<style>.CodeMirror {border:1px solid #999; background:#ffc}</style>
View
2  mode/groovy/index.html
@@ -5,7 +5,7 @@
<title>CodeMirror: Groovy mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/matchbrackets.js"></script>
+ <script src="../../addon/edit/matchbrackets.js"></script>
<script src="groovy.js"></script>
<link rel="stylesheet" href="../../doc/docs.css">
<style>.CodeMirror {border-top: 1px solid #500; border-bottom: 1px solid #500;}</style>
View
2  mode/haskell/index.html
@@ -5,7 +5,7 @@
<title>CodeMirror: Haskell mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/matchbrackets.js"></script>
+ <script src="../../addon/edit/matchbrackets.js"></script>
<script src="haskell.js"></script>
<link rel="stylesheet" href="../../theme/elegant.css">
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
View
4 mode/javascript/index.html
@@ -5,8 +5,8 @@
<title>CodeMirror: JavaScript mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/matchbrackets.js"></script>
- <script src="../../lib/util/continuecomment.js"></script>
+ <script src="../../addon/edit/matchbrackets.js"></script>
+ <script src="../../addon/edit/continuecomment.js"></script>
<script src="javascript.js"></script>
<link rel="stylesheet" href="../../doc/docs.css">
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
View
2  mode/less/index.html
@@ -5,7 +5,7 @@
<title>CodeMirror: LESS mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/matchbrackets.js"></script>
+ <script src="../../addon/edit/matchbrackets.js"></script>
<script src="less.js"></script>
<style>.CodeMirror {background: #f8f8f8; border: 1px solid #ddd; font-size:12px; height: 400px}</style>
<link rel="stylesheet" href="../../doc/docs.css">
View
2  mode/lua/index.html
@@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>CodeMirror: Lua mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
- <script src="../../lib/util/matchbrackets.js"></script>
+ <script src="../../addon/edit/matchbrackets.js"></script>
<script src="../../lib/codemirror.js"></script>
<script src="lua.js"></script>
<link rel="stylesheet" href="../../theme/neat.css">
View
2  mode/markdown/index.html
@@ -5,7 +5,7 @@
<title>CodeMirror: Markdown mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/continuelist.js"></script>
+ <script src="../../addon/edit/continuelist.js"></script>
<script src="../xml/xml.js"></script>
<script src="markdown.js"></script>
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
View
2  mode/ocaml/index.html
@@ -10,7 +10,7 @@
</style>
<script src=../../lib/codemirror.js></script>
-<script src=../../lib/util/matchbrackets.js></script>
+<script src=../../addon/edit/matchbrackets.js></script>
<script src=ocaml.js></script>
<h1>CodeMirror: OCaml mode</h1>
View
2  mode/php/index.html
@@ -5,7 +5,7 @@
<title>CodeMirror: PHP mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/matchbrackets.js"></script>
+ <script src="../../addon/edit/matchbrackets.js"></script>
<script src="../htmlmixed/htmlmixed.js"></script>
<script src="../xml/xml.js"></script>
<script src="../javascript/javascript.js"></script>
View
2  mode/python/index.html
@@ -5,7 +5,7 @@
<title>CodeMirror: Python mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/matchbrackets.js"></script>
+ <script src="../../addon/edit/matchbrackets.js"></script>
<script src="python.js"></script>
<link rel="stylesheet" href="../../doc/docs.css">
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
View
2  mode/ruby/index.html
@@ -5,7 +5,7 @@
<title>CodeMirror: Ruby mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/matchbrackets.js"></script>
+ <script src="../../addon/edit/matchbrackets.js"></script>
<script src="ruby.js"></script>
<style>
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
View
2  mode/sass/index.html
@@ -5,7 +5,7 @@
<title>CodeMirror: Sass mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/matchbrackets.js"></script>
+ <script src="../../addon/edit/matchbrackets.js"></script>
<script src="sass.js"></script>
<style>.CodeMirror {border: 1px solid #ddd; font-size:12px; height: 400px}</style>
<link rel="stylesheet" href="../../doc/docs.css">
View
2  mode/shell/index.html
@@ -10,7 +10,7 @@
</style>
<script src=../../lib/codemirror.js></script>
-<script src="../../lib/util/matchbrackets.js"></script>
+<script src="../../addon/edit/matchbrackets.js"></script>
<script src=shell.js></script>
<h1>CodeMirror: Shell mode</h1>
View
2  mode/smalltalk/index.html
@@ -5,7 +5,7 @@
<title>CodeMirror: Smalltalk mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/matchbrackets.js"></script>
+ <script src="../../addon/edit/matchbrackets.js"></script>
<script src="smalltalk.js"></script>
<link rel="stylesheet" href="../../doc/docs.css">
<style>
View
2  mode/sparql/index.html
@@ -5,7 +5,7 @@
<title>CodeMirror: SPARQL mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/matchbrackets.js"></script>
+ <script src="../../addon/edit/matchbrackets.js"></script>
<script src="sparql.js"></script>
<style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
<link rel="stylesheet" href="../../doc/docs.css">
View
2  mode/tiddlywiki/index.html
@@ -5,7 +5,7 @@
<title>CodeMirror: TiddlyWiki mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
- <script src="../../lib/util/matchbrackets.js"></script>
+ <script src="../../addon/edit/matchbrackets.js"></script>
<script src="tiddlywiki.js"></script>
<link rel="stylesheet" href="tiddlywiki.css">
<link rel="stylesheet" href="../../doc/docs.css">
View
2  mode/vb/index.html
@@ -12,7 +12,7 @@
.CodeMirror-scroll { overflow-x: auto; overflow-y: hidden;}
.CodeMirror pre { font-family: Inconsolata; font-size: 14px}
</style>
- <script type="text/javascript" src="../../lib/util/runmode.js"></script>
+ <script type="text/javascript" src="../../addon/runmode/runmode.js"></script>
</head>
<body onload="init()">
<h1>CodeMirror: VB.NET mode</h1>
View
4 test/index.html
@@ -7,8 +7,8 @@
<link rel="stylesheet" href="../doc/docs.css">
<link rel="stylesheet" href="mode_test.css">
<script src="../lib/codemirror.js"></script>
- <script src="../lib/util/overlay.js"></script>
- <script src="../lib/util/searchcursor.js"></script>
+ <script src="../addon/mode/overlay.js"></script>
+ <script src="../addon/search/searchcursor.js"></script>
<script src="../mode/javascript/javascript.js"></script>
<script src="../mode/xml/xml.js"></script>
<script src="../keymap/vim.js"></script>
View
1  test/run.js
@@ -4,6 +4,7 @@ var lint = require("./lint/lint");
lint.checkDir("mode");
lint.checkDir("lib");
+lint.checkDir("addon");
var ok = lint.success();
Please sign in to comment.
Something went wrong with that request. Please try again.