data-setup icon indicating copy to clipboard operation
data-setup copied to clipboard

Consider using `select_keymap` nbextension instead of custom code block in `custom.js`

Open brunolajoie opened this issue 3 years ago • 2 comments

Current setup

// ~/.jupyter/custom/custom.js
require(["codemirror/keymap/sublime", "notebook/js/cell", "base/js/namespace"],
    function(sublime_keymap, cell, IPython) {
        cell.Cell.options_default.cm_config.keyMap = 'sublime';
        var cells = IPython.notebook.get_cells();
        for(var c=0; c< cells.length ; c++){
            cells[c].code_mirror.setOption('keyMap', 'sublime');
        }
    }
);

New setup to try (because easier)

install nbextension select_keymap from the UI menu

image

brunolajoie avatar Jan 31 '22 11:01 brunolajoie

Link to discussion on slack about having extension always on by default

brunolajoie avatar Jan 31 '22 11:01 brunolajoie

Starting week 7, 50% of students in batch 802 lost their Sublime Keymap. The reason: they changed virtualenvs.

@vtmoreau I'll let you investigate but I think we shouldn't use this extension, and get back to the easy ~/.jupyter/custom/custom.js for everyone, because it is not affected by change of virtual envs.

Unless we find a way to make this extension maintain its behavior across pyenv virtualenvs

brunolajoie avatar Mar 29 '22 12:03 brunolajoie

@Bruncky any issues with sublime keymapping for Jupyter Notebook in your lasat batch?

brunolajoie avatar Sep 20 '22 07:09 brunolajoie

@brunolajoie, I don't remember seeing any issues!

Bruncky avatar Sep 20 '22 09:09 Bruncky

Cool! I think we can close then!

brunolajoie avatar Sep 21 '22 12:09 brunolajoie