##// END OF EJS Templates
Base of an as you type conpleter....
Base of an as you type conpleter. when invoking the completer, instead of having to chose/dismiss, you can continue typing, it will filter the result "as you type" and dismiss itself if ther is no match left. As it is now, it's only works with lowercase letters, I need to find a workaroud for this. for example if you type : * P-y-<tab>-S-o-m-e-t-h-i-n-g * it will propose PySide, but will dismiss when 'o' is pressed and pasting Pyso with a lower case 's'

File last commit:

r4982:c0fb925d
r5507:6b2d9cce
Show More
README-IPython.rst
33 lines | 1.6 KiB | text/x-rst | RstLexer

CodeMirror in IPython

We carry a mostly unmodified copy of CodeMirror. The current version we use is (please update this information when updating versions):

CodeMirror 2.15

The only changes we've applied so far are these:

diff --git a/IPython/frontend/html/notebook/static/codemirror/mode/python/python.js b/IPython/frontend/html/notebook/static/codemirror/mode/python/python.js
index ca94e7a..fc9a503 100644
--- a/IPython/frontend/html/notebook/static/codemirror/mode/python/python.js
+++ b/IPython/frontend/html/notebook/static/codemirror/mode/python/python.js
@@ -5,7 +5,11 @@ CodeMirror.defineMode("python", function(conf, parserConf) {
         return new RegExp("^((" + words.join(")|(") + "))\\b");
     }

-    var singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!]");
+    // IPython-specific changes: add '?' as recognized character.
+    //var singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!]");
+    var singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!\\?]");
+    // End IPython changes.
+
     var singleDelimiters = new RegExp('^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]');
     var doubleOperators = new RegExp("^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))");
     var doubleDelimiters = new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))");

In practice it's just a one-line change, adding \? to singleOperators, surrounded by a comment. We'll turn this into a proper patchset if it ever gets more complicated than this, but for now this note should be enough.