]> code.delx.au - gnu-emacs-elpa/blob - js2-mode-readme.txt
Initial repository contents
[gnu-emacs-elpa] / js2-mode-readme.txt
1 This JavaScript editing mode supports:
2
3 - strict recognition of the Ecma-262 language standard
4 - support for most Rhino and SpiderMonkey extensions from 1.5 to 1.8
5 - parsing support for ECMAScript for XML (E4X, ECMA-357)
6 - accurate syntax highlighting using a recursive-descent parser
7 - on-the-fly reporting of syntax errors and strict-mode warnings
8 - undeclared-variable warnings using a configurable externs framework
9 - "bouncing" line indentation to choose among alternate indentation points
10 - smart line-wrapping within comments and strings
11 - code folding:
12 - show some or all function bodies as {...}
13 - show some or all block comments as /*...*/
14 - context-sensitive menu bar and popup menus
15 - code browsing using the `imenu' package
16 - typing helpers such as automatic insertion of matching braces/parens
17 - many customization options
18
19 The mode includes a port of Mozilla Rhino's scanner, parser and symbol
20 table. Ideally it should stay in sync with Rhino, keeping `js2-mode'
21 current as the EcmaScript language standard evolves.
22
23 Unlike cc-engine based language modes, js2-mode's line-indentation is
24 not customizable. It is a surprising amount of work to support
25 customizable indentation. The current compromise is that the tab key
26 lets you cycle among various likely indentation points, similar to the
27 behavior of python-mode.
28
29 This mode does not yet work with "multi-mode" modes such as `mmm-mode'
30 and `mumamo', although it could be made to do so with some effort.
31 This means that `js2-mode' is currently only useful for editing
32 JavaScript files, and not for editing JavaScript within <script> tags
33 or templates.
34