all repos — NoPaste @ 3e3c433f026c49e04d0efa0f0f39fc688ed32bb1

Resurrected - The PussTheCat.org fork of NoPaste

scripts/CodeMirror/mode/nsis/index.html (view raw)

 1<!doctype html>
 2
 3<title>CodeMirror: NSIS mode</title>
 4<meta charset="utf-8"/>
 5<link rel=stylesheet href="../../doc/docs.css">
 6
 7<link rel=stylesheet href=../../lib/codemirror.css>
 8<script src=../../lib/codemirror.js></script>
 9<script src="../../addon/mode/simple.js"></script>
10<script src="../../addon/edit/matchbrackets.js"></script>
11<script src=nsis.js></script>
12<style type=text/css>
13  .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
14</style>
15<div id=nav>
16  <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png" alt=""></a>
17
18  <ul>
19    <li><a href="../../index.html">Home</a>
20    <li><a href="../../doc/manual.html">Manual</a>
21    <li><a href="https://github.com/codemirror/codemirror">Code</a>
22  </ul>
23  <ul>
24    <li><a href="../index.html">Language modes</a>
25    <li><a class=active href="#">NSIS</a>
26  </ul>
27</div>
28
29<article>
30<h2>NSIS mode</h2>
31
32
33<textarea id=code>
34; This is a comment
35!ifdef ERROR
36    !error "Something went wrong"
37!endif
38
39OutFile "demo.exe"
40RequestExecutionLevel user
41SetDetailsPrint listonly
42
43!include "LogicLib.nsh"
44!include "WinVer.nsh"
45
46Section -mandatory
47
48    Call logWinVer
49
50    ${If} 1 > 0
51      MessageBox MB_OK "Hello world"
52    ${EndIf}
53
54SectionEnd
55
56Function logWinVer
57
58    ${If} ${IsWin10}
59        DetailPrint "Windows 10!"
60    ${ElseIf} ${AtLeastWinVista}
61        DetailPrint "We're post-XP"
62    ${Else}
63        DetailPrint "Legacy system"
64    ${EndIf}
65
66FunctionEnd
67</textarea>
68
69<script>
70  var editor = CodeMirror.fromTextArea(document.getElementById('code'), {
71    mode: 'nsis',
72    indentWithTabs: true,
73    smartIndent: true,
74    lineNumbers: true,
75    matchBrackets: true
76  });
77</script>
78
79<p><strong>MIME types defined:</strong> <code>text/x-nsis</code>.</p>
80</article>