ho la seguente configurazione per le scorciatoie, che funziona dopo l'esecuzione nella cella di Giove notebook:Come aggiungere permanentemente le scorciatoie da tastiera al taccuino Jupyter (ipython)?
%%javascript
IPython.keyboard_manager.command_shortcuts.add_shortcut('ctrl-q', {
help: 'Clear all output', // This text will show up on the help page (CTRL-M h or ESC h)
handler: function (event) { // Function that gets invoked
if (IPython.notebook.mode == 'command') {
IPython.notebook.clear_all_output();
return false;
}
return true;
}
});
Come posso configurazione Giove notebook per rendere questa inizializzazione automaticamente all'avvio?
Ho provato ad aggiungere lo stesso codice (senza %%javascript
) a C:\Users\<username>\.ipython\profile_default\static\custom\custom.js
ma non ha funzionato.
Ho un solo profilo, creata con ipython profile create
, Python 3.3, Windows 7.
Grazie in anticipo.
nota che, per jupyter 'custom.js' si trova in' ~/.jupyter/custom/custom.js' –