diff --git a/juhasch/breakpoint.js b/breakpoint.js similarity index 100% rename from juhasch/breakpoint.js rename to breakpoint.js diff --git a/juhasch/codefolding.js b/codefolding.js similarity index 100% rename from juhasch/codefolding.js rename to codefolding.js diff --git a/juhasch/comment-uncomment.js b/comment-uncomment.js similarity index 100% rename from juhasch/comment-uncomment.js rename to comment-uncomment.js diff --git a/juhasch/history.js b/history.js similarity index 100% rename from juhasch/history.js rename to history.js diff --git a/juhasch/hotkeys.js b/hotkeys.js similarity index 100% rename from juhasch/hotkeys.js rename to hotkeys.js diff --git a/juhasch/README.md b/juhasch/README.md deleted file mode 100644 index 701505f..0000000 --- a/juhasch/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# IPython-nb-extensions - -* breakpoint - allow setting of breakpoints for notebook cells - -* hotkeys - add PGUP / PGDOWN / HOME / END hotkeys for fast scrolling in codecells - -* slideshow - add toolbar and visual hints to slideshow extension - -* history - add individual cell history (just a test...) - -* read-only - allow codecells to be set read-only, so no editing or celle execution is possible - -* shift-tab - assign shift-tab to dedent - -* codefolding - fold code blocks using Alt-F or clicking on line numbers - -* linenumbers - display line numbers in codecells using Alt-N - -* comment-uncomment - toggle comments in selected lines using Alt-C - -* split-combine - split/combine cells using Alt-S, Alt-A, Alt-B - - -The notebook extensions require patching IPython: -Add line comment symbol to codemirror-ipython.js: -```javascript -... - var external = { - lineComment: '#', // ** NEW ** - startState: function(basecolumn) { -... -``` - -Also, some patching of codemirror is required: - -1. Correct CodeMirror.indentRangeFinder in CodeMirror/addon/indent-fold.js (https://github.com/marijnh/CodeMirror/pull/1122) -```javascript -CodeMirror.indentRangeFinderA = function(cm, start) { - var tabSize = cm.getOption("tabSize"), firstLine = cm.getLine(start.line); - var myIndent = CodeMirror.countColumn(firstLine, null, tabSize); - for (var i = start.line + 1, end = cm.lineCount(); i < end; ++i) { - var curLine = cm.getLine(i); - if ((CodeMirror.countColumn(curLine, null, tabSize) == myIndent)&& - (CodeMirror.countColumn(cm.getLine(i-1), null, tabSize) > myIndent)){ - return {from: {line: start.line, ch: firstLine.length}, - to: {line: i, ch: curLine.length}}; - } - } -}; -``` - -2. Update CodeMirror/addon/fold/foldcolde.js from git repo - -3. Update CodeMirror.defineExtension in CodeMirror/addon/comment/comment.js -```javascript - CodeMirror.defineExtension("uncomment", function(from, to, options) { - if (!options) options = noOptions; - var self = this, mode = CodeMirror.innerMode(self.getMode(), self.getTokenAt(from).state).mode; - var end = Math.min(to.line, self.lastLine()), start = Math.min(from.line, end); - if (to.ch == 0 && to.line > from.line) - { - console.log(start, end); - end--; - } - // Try finding line comments - var lineString = options.lineComment || mode.lineComment, lines = []; - var pad = options.padding == null ? " " : options.padding; - lineComment: for(;;) { - if (!lineString) break; - for (var i = start; i <= end; ++i) { - var line = self.getLine(i); - var found = line.indexOf(lineString); - if (found == -1 && (i != end || i == start) && nonWS.test(line)) break lineComment; - if (i != start && nonWS.test(line.slice(0, found))) break lineComment; - if (found > 1) break lineComment; // only mind comments at the start of the line - lines.push(line); - } -``` \ No newline at end of file diff --git a/juhasch/linenumbers.js b/linenumbers.js similarity index 100% rename from juhasch/linenumbers.js rename to linenumbers.js diff --git a/juhasch/python/ipy_nb_history_websocket.py b/python/ipy_nb_history_websocket.py similarity index 100% rename from juhasch/python/ipy_nb_history_websocket.py rename to python/ipy_nb_history_websocket.py diff --git a/juhasch/read-only.js b/read-only.js similarity index 100% rename from juhasch/read-only.js rename to read-only.js diff --git a/juhasch/shift-tab.js b/shift-tab.js similarity index 100% rename from juhasch/shift-tab.js rename to shift-tab.js diff --git a/juhasch/slideshow.js b/slideshow.js similarity index 100% rename from juhasch/slideshow.js rename to slideshow.js diff --git a/juhasch/split-combine.js b/split-combine.js similarity index 100% rename from juhasch/split-combine.js rename to split-combine.js