Description: Use Codemirror 2.x
Author: Jonas Smedegaard <dr@jones.dk>
Last-Update: 2012-06-12

--- a/share/index.html
+++ b/share/index.html
@@ -3,10 +3,19 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 	<title>SPARQL</title>
+	<link rel="stylesheet" type="text/css" href="/js/codemirror/codemirror.css"/>
 	<link rel="stylesheet" type="text/css" href="/css/docs.css"/>
-    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
-    <script src="/js/codemirror.js" type="text/javascript"></script>
-	<script type="text/javascript" src="/js/sparql_form.js"></script>
+	<script type="text/javascript" src="/js/codemirror/codemirror.js"></script>
+	<script type="text/javascript" src="/js/codemirror/mode/sparql/sparql.js"></script>
+<script type="text/javascript">
+function init() {
+	var editor = CodeMirror.fromTextArea(document.getElementById("query"), {
+		mode: "application/x-sparql-query",
+		tabMode: "indent",
+		matchBrackets: true
+	});
+}
+</script>
 <style type="text/css">
 <!--
 tr:nth-child(odd) {
@@ -21,7 +30,7 @@
 }
 // -->
 </style>
-</head><body>
+</head><body onload="init()">
 	<form id="queryform" action="" method="get">
 	<p>
 		<textarea id="query" name="query" rows="10" cols="60">
