From 69fa5fd886cb6cc77ff5df40bc15c194996cc215 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Thu, 21 Feb 2013 15:09:38 +0100 Subject: [PATCH] Clean up documentation for addons, mention lint addon --- doc/manual.html | 63 +++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/doc/manual.html b/doc/manual.html index 3ef0456184..0071d39a4f 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -1357,14 +1357,14 @@

Add-ons

functionality. In brief, they are:

-
dialog.js
+
dialog/dialog.js
Provides a very simple way to query users for text input. Adds an openDialog method to CodeMirror instances, which can be called with an HTML fragment that provides the prompt (should include an input tag), and a callback function that is called when text has been entered. Depends on addon/dialog/dialog.css.
-
searchcursor.js
+
search/searchcursor.js
Adds the getSearchCursor(query, start, caseFold) → cursor method to CodeMirror instances, which can be used to implement search/replace functionality. query @@ -1393,14 +1393,14 @@

Add-ons

replacement.
- +
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 searchcursor.js, and will make use of openDialog when available to make prompting for search queries less ugly.
-
matchbrackets.js
+
edit/matchbrackets.js
Defines an option matchBrackets which, when set to true, causes matching brackets to be highlighted whenever the cursor is next to them. It also adds a @@ -1408,14 +1408,14 @@

Add-ons

once, and a method findMatchingBracket that can be used to run the bracket-finding algorithm that this uses internally.
-
closebrackets.js
+
edit/closebrackets.js
Defines an option autoCloseBrackets that will auto-close brackets and quotes when typed. By default, it'll auto-close ()[]{}''"", but you can pass it a string similar to that (containing pairs of matching characters) to customize it. Demo here.
-
foldcode.js
+
fold/foldcode.js
Helps with code folding. See the demo for an example. Call CodeMirror.newFoldFunction with a range-finder @@ -1431,12 +1431,12 @@

Add-ons

where indentation determines block structure (Python, Haskell), and CodeMirror.tagRangeFinder, for XML-style languages.
-
collapserange.js
+
fold/collapserange.js
Another approach to folding. See demo. Allows the user to select a range to fold by clicking in the gutter.
-
runmode.js
+
runmode/runmode.js
Can be used to run a CodeMirror mode over text without actually opening an editor instance. See the demo for an example. @@ -1445,7 +1445,7 @@

Add-ons

(without including all of CodeMirror) and for running under node.js.
-
overlay.js
+
mode/overlay.js
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 @@ -1453,7 +1453,7 @@

Add-ons

Defines CodeMirror.overlayMode, which is used to create such a mode. See this demo for a detailed example.
-
multiplex.js
+
mode/multiplex.js
Mode combinator that can be used to easily 'multiplex' between several modes. Defines CodeMirror.multiplexingMode which, when @@ -1472,7 +1472,7 @@

Add-ons

see the content between the delimiters. See this demo for an example.
-
show-hint.js
+
hint/show-hint.js
Provides a framework for showing autocompletion hints. Defines CodeMirror.showHint, which takes a CodeMirror instance and a hinting function, and pops up a widget @@ -1482,44 +1482,41 @@

Add-ons

is an array of strings (the completions), and from and to give the start and end of the token that is being completed. Depends - on addon/hint/show-hint.css. - See the demo for an + on addon/hint/show-hint.css. See the other files in + the addon/hint for + hint sources for various languages. Check + out the demo for an example.
-
simple-hint.js
-
Defines CodeMirror.simpleHint, which is - compatible with showHint. Deprecated, - use showHint instead. Depends - on addon/hint/simple-hint.css.
-
javascript-hint.js
-
Defines CodeMirror.javascriptHint - and CodeMirror.coffeescriptHint, which are simple - hinting functions for the JavaScript and CoffeeScript - modes.
-
xml-hint.js
-
Defines CodeMirror.xmlHint, a hinting function - for XML (which requires a schema to be defined).
-
python-hint.js
-
Defines CodeMirror.pythonHint, a hinter for Python code.
match-highlighter.js
Adds a highlightSelectionMatches option that can be enabled to highlight all instances of a currently selected word. Demo here.
-
mark-selection.js
+
lint/lint.js
+
Defines an interface component for showing linting warnings, + with pluggable warning sources + (see json-lint.js + and javascript-lint.js + in the same directory). Defines a lintWith option + that can be set to a warning source (for + example CodeMirror.javascriptValidator). Depends + on addon/lint/lint.css. A demo can be + found here.
+
selection/mark-selection.js
Causes the selected text to be marked with the CSS class CodeMirror-selectedtext when the styleSelectedText option is enabled. Useful to change the colour of the selection (in addition to the background), like in this demo.
-
active-line.js
+
selection/active-line.js
Defines a styleActiveLine option that, when enabled, gives the wrapper of the active line the class CodeMirror-activeline, and adds a background with the class CodeMirror-activeline-background. is enabled. See the demo.
-
closetag.js
+
edit/closetag.js
Provides utility functions for adding automatic tag closing to XML modes. See the demo.
-
loadmode.js
+
mode/loadmode.js
Defines a CodeMirror.requireMode(modename, callback) function that will try to load a given mode and call the callback when it succeeded. You'll have to @@ -1531,7 +1528,7 @@

Add-ons

which will ensure the given mode is loaded and cause the given editor instance to refresh its mode when the loading succeeded. See the demo.
-
continuecomment.js
+
edit/continuecomment.js
Adds a command called newlineAndIndentContinueComment that you can bind Enter to in order to have the editor prefix