CodeMirror: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
== Description ==
== Description ==


A work-in-progress NSIS mode for [http://codemirror.net/ CodeMirror], supporting NSIS 2.46 and 3.0b2. The pull request for inclusion into the official CodeMirror repository has been merged into the master branch, a release is pending.
As of [https://github.com/codemirror/CodeMirror/releases/tag/5.8.0 version 5.8], the JavaScript texteditor [http://codemirror.net/ CodeMirror] supports NSIS 2.46 and 3.0b2.  


CodeMirror modes can also be used with the [http://brackets.io/ Adobe Brackets] and [http://lighttable.com/ Light Table] code editors.
CodeMirror modes can also be used with the [http://brackets.io/ Adobe Brackets] and [http://lighttable.com/ Light Table] code editors.
Line 7: Line 7:
== Installation ==
== Installation ==


1. Download the [https://github.com/idleberg/codemirror-nsis/releases release files] and place the JavaScript into <code>mode/file</code>
Download the [http://codemirror.net/codemirror.zip latest release] or clone the repository <code>git clone <nowiki>https://github.com/codemirror/CodeMirror.git</nowiki></code>


2. Refer to the [http://codemirror.net/doc/ CodeMirror Manual] for build instructions
== Basic Usage ==
 
The easiest way to use CodeMirror is to simply load the script and style sheet found under <code>lib/</code> in the distribution, plus a mode script from one of the <code>mode/</code> directories. (See [http://codemirror.net/doc/compress.html the compression helper] for an easy way to combine scripts.)
 
For example:
 
<pre><script src="lib/codemirror.js"></script>
<link rel="stylesheet" href="lib/codemirror.css">
<script src="mode/nsis/nsis.js"></script></pre>
 
Alternatively, you can load CodeMirror from a Content Delivery Network such as [http://cdnjs.com/libraries/codemirror cdnjs]:
 
<pre><script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.8.0/codemirror.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.8.0/codemirror.min.js">
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.8.0/nsis/nsis.js"></script></pre>
 
Refer to the [http://codemirror.net/doc/manual.html CodeMirror Manual] for further usage examples.


== License ==
== License ==


Released under [http://opensource.org/licenses/MIT The MIT License].
Released under [http://opensource.org/licenses/MIT The MIT License].
== Links ==
* [http://codemirror.net/ CodeMirror] website
* [http://github.com/codemirror/CodeMirror CodeMirror] on GitHub
* [http://github.com/idleberg/codemirror-nsis NSIS mode] on GitHub


[[Category:Syntax_Highlighting]]
[[Category:Syntax_Highlighting]]
[[Category:Development Environments]]
[[Category:Development Environments]]

Revision as of 10:15, 20 October 2015

Description

As of version 5.8, the JavaScript texteditor CodeMirror supports NSIS 2.46 and 3.0b2.

CodeMirror modes can also be used with the Adobe Brackets and Light Table code editors.

Installation

Download the latest release or clone the repository git clone https://github.com/codemirror/CodeMirror.git

Basic Usage

The easiest way to use CodeMirror is to simply load the script and style sheet found under lib/ in the distribution, plus a mode script from one of the mode/ directories. (See the compression helper for an easy way to combine scripts.)

For example:

<script src="lib/codemirror.js"></script>
<link rel="stylesheet" href="lib/codemirror.css">
<script src="mode/nsis/nsis.js"></script>

Alternatively, you can load CodeMirror from a Content Delivery Network such as cdnjs:

<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.8.0/codemirror.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.8.0/codemirror.min.js">
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.8.0/nsis/nsis.js"></script>

Refer to the CodeMirror Manual for further usage examples.

License

Released under The MIT License.

Links