diff --git a/IPython/frontend/html/notebook/static/codemirror/lib/codemirror.js b/IPython/frontend/html/notebook/static/codemirror/lib/codemirror.js
index 89401a9..a9dfdfe 100644
--- a/IPython/frontend/html/notebook/static/codemirror/lib/codemirror.js
+++ b/IPython/frontend/html/notebook/static/codemirror/lib/codemirror.js
@@ -2194,6 +2194,20 @@ var CodeMirror = (function() {
       cm.indentLine(cm.getCursor().line);
     },
     toggleOverwrite: function(cm) {cm.toggleOverwrite();}
+    ,delSpaceToPrevTabStop : function(cm){
+        var from = cm.getCursor(true), to = cm.getCursor(false), sel = !posEq(from, to);
+        if (!posEq(from, to)) {cm.replaceRange("", from, to); return}
+        var cur = cm.getCursor(), line = cm.getLine(cur.line);
+        var tabsize = cm.getOption('tabSize');
+        var chToPrevTabStop = cur.ch-(Math.ceil(cur.ch/tabsize)-1)*tabsize;
+        var from = {ch:cur.ch-chToPrevTabStop,line:cur.line}
+        var select = cm.getRange(from,cur)
+        if( select.match(/^\ +$/) != null){
+            cm.replaceRange("",from,cur)
+        } else {
+            cm.deleteH(-1,"char")
+        }
+    }
   };
 
   var keyMap = CodeMirror.keyMap = {};