keyboard shortcuts for Print View and Run All #2228

Closed
tmbdev opened this Issue Aug 1, 2012 · 16 comments
@tmbdev

I'm using Notebook 0.13. Could you add keyboard shortcuts for

  • Print View
  • Run All

They don't seem to be there right now. Run All and Restart probably also should have buttons.

@Carreau
IPython member

We are short on availlable shortcut, and I think personally that run-all and print-view are not enough used to have a default shortcut.
We plan on making the notebook shortcut configurable. 0.14-dev already allows you to inject custom JS that can do than but not in a easy way.
Would this solve your issue ?

@tmbdev
@Carreau
IPython member

(1) hunt for Restart in Kernel
(2) go to the last entry in Cell, select a submenu, clear all output
(3) go to the Cell menu again and select Run All

What makes this even worse is the fact that the menus don't behave like
regular menus: if I click and drag, I end up dragging the menu button
image, and if I click on the submenu button, the entire menu disappears.
So I often need several times to get this right. It is very frustrating.

It might be hard to circumvent browser on this.

My suggestions:

(1) put a "Start Over" button into the toolbar that clears all output,
restarts the kernel, and runs everything
(2) make sure that the menus behave more like regular desktop menus

I totally understand that it can be long and repetitive.

How would you feel of trying some dev features not merged yet with some configuration to do (1) ?

1 - You need recent dev (post merge of #2175)
2 - Try merging #2127 into your current branch (it allows to add custom button to the toolbar.)
3 - create into your profile(s) you use a folder static/js/custom.js (it allows you to inject js into the notebook at startup)

if you are not afraid of tinkering a little with JS, you can add something like thin in custom.js:

mycustomfunction = (function(){
    var innerfunction = function(){
                dofirstthing(); // probably IPython.notebook..... 
                dosecond();
                dothird();
          }

    IPython.maintoolbar.addButtonsGroup([
            {
                'label'   : 'Clear output, kill kernel, run all',
                'icon'    : 'name of the icon you want ',    //see http://jqueryui.com/themeroller/
                'callback': innerfunction
            }
        ])();
})();

We are pretty overwhelmed right now, so I didn't try and it might not be exactly that, but if you need more help, just ask again.

Will it be helpful ?
You can of course add more button if you wish with the actions/icon you want.

When all the PR will be merged in master, would you think writing something like that to customize the notebook is too complicated ? Did it worked as expected ?

Thanks.
--
Matthias

@ellisonbg
IPython member

I like the "Start Over" idea.

@xamox

Thumbs up on this as well.

@vext01

+1 for a shortcut to run all cells. Thanks

@Carreau
IPython member

let go Ctrl after pressing M.

  • press Ctrl
  • press M
  • release M
  • Release Ctrl
  • Press R.
@igauravsehrawat

@Carreau i got it working . other way
There is an entry in Cell menu to Run all cells.
Cell menu -> Run -> All
Thanks

@minrk minrk removed the type-enhancement label Jan 14, 2015
@bridge29

I am also a fan of "start over" button. I would love it also to be a two-button press shortcut. Thanks!

@srodriguex

A "run all" shortcut would be very helpful, indeed.

@InbarItay

Agreed

@nathanielatom

+1 for "start over" button and two-button keyboard shortcut.

@Carreau
IPython member

+1 for "start over" button and two-button keyboard shortcut.

Which is the extension we did 2 weeks ago at scipy tutorial

000, to kill kernel, clear all, restart and run all.

@oleiade

+1 for run all

@snowch

+1 for run all

@damianavila

Restart & Run all hit master here: jupyter/notebook#400

I guess we can close here...

@Carreau Carreau closed this Sep 14, 2015
@minrk minrk modified the milestone: no action, wishlist Sep 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment