匹配括号

This commit is contained in:
Liang Ding 2014-09-11 14:13:09 +08:00
parent 8c6802a112
commit 15c03a6a4a
2 changed files with 2 additions and 0 deletions

View File

@ -149,6 +149,7 @@ var editors = {
var editor = CodeMirror.fromTextArea(document.getElementById("editor" + id), { var editor = CodeMirror.fromTextArea(document.getElementById("editor" + id), {
lineNumbers: true, lineNumbers: true,
autoCloseBrackets: true, autoCloseBrackets: true,
matchBrackets: true,
highlightSelectionMatches: {showToken: /\w/}, highlightSelectionMatches: {showToken: /\w/},
rulers: rulers, rulers: rulers,
styleActiveLine: true, styleActiveLine: true,

View File

@ -167,6 +167,7 @@
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/display/fullscreen.js"></script> <script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/display/fullscreen.js"></script>
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/display/rulers.js"></script> <script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/display/rulers.js"></script>
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/edit/closebrackets.js"></script> <script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/edit/closebrackets.js"></script>
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/edit/matchbrackets.js"></script>
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/edit/closetag.js"></script> <script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/edit/closetag.js"></script>
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/search/searchcursor.js"></script> <script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/search/searchcursor.js"></script>
<script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/search/match-highlighter.js"></script> <script type="text/javascript" src="{{.Wide.StaticServer}}/static/js/lib/codemirror-4.5/addon/search/match-highlighter.js"></script>