Jupyter Notebook: enable vertical scrolling in code block - jupyter

How do I enable vertical scrolling in a code block in a jupyter notebook?
I've done it accidentally before, but now I can't reproduce it. What I found was set autoscroll = true in the file itself using a text editor...
However, I did that... and it already has a setting, "scrolled": true. In the notebook, it has only horizontal scrolling, so I guess that is what the "scrolled" setting modified.

In order to enable vertical scrolling in an output cell of the notebook, you just need to click to the left of the cell content (in the margin, you will see the area becomes slighty shaded when you are over it).
If you double click, the content of output cell will be hidden.
If you would like to hide the content of an input cell, see also Scroll windows for code in iPython (Jupyter) Notebooks?.

As suggested by #Mandy, to turn on horizontal scrolling in Jupyter code window just go to Cell>Current/All Outputs>Toggle Scrolling

You can try Cell -> Current Outputs -> Toggle Scrolling in the Jupyter UI to enable the scrolling for the output of one cell.

Run this code at the end of yours:
from IPython.display import display, HTML
js = "<script>$('.output_scroll').removeClass('output_scroll')</script>"
display(HTML(js))

Related

Notebook smooth scrolling

Is there a way to enable smooth scrolling in vscode notebooks?
I'd like to use the up/down arrows to scroll through the notebook and not have it shift focus from cell to cell.
In Jupyter notebooks (webserver), it can be done by inserting the following code in the first cell:
%%javascript
Jupyter.keyboard_manager.command_shortcuts.remove_shortcut('up');
Jupyter.keyboard_manager.command_shortcuts.remove_shortcut('down');
Unfortunately, the same command does not work in vscode.
How do I enable it?

Move the cell in jupyter notebook up and down

I have a cell (cell 39), I wish to move up to the top of cell 40.
I know I could grab and drag to the place. However, I see that in official document, you could move it with the vertical bar on the left. However, I does not have one, and could not find the setting to make it display.
Demonstration in Visual Code.
Jupyter Notebook in chrome version has a similar botton for this function
Jupyter Notebook web version.
According to https://github.com/microsoft/vscode-jupyter/issues/6812 you can use alt(option)+arrow up/down to move the selected cell.
Or, use Command Palette with Notebook: Move

How to make smooth scrolling in VSC terminal?

I'm working in VSC and writting nodejs and I am faced with a scroll problem in long terminal outputs, scroll on the right side of terminal with slider goes too many rows too fast if I use them, so, question is, do we have smooth scroll option in integrated terminal to read output easy and line by line with arrows or we must use another external terminal for that?
Thanks.
In v1.71 smooth scrolling will be improved, see Release Notes: Terminal Smooth Scrolling.
The terminal now supports smooth scrolling which will animate
scrolling over a short period to help orient yourself after scrolling,
like the feature that is also available in the editor and lists. To
enable it set:
json "terminal.integrated.smoothScrolling": true
In vscode v1.42 (early February, 2020) two new commands related to terminal mouse wheel scroll sensitivity will be introduced:
Scrolling sensitivity
The terminal's scrolling sensitivity can now be configured independent
of the editor using the new settings
terminal.integrated.mouseWheelScrollSensitivity and
terminal.integrated.fastScrollSensitivity.
See https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_42.md#scrolling-sensitivity
Thanks to #Sean and #user9811991 in the comments for pointing out that the setting is a multiplier. My terminal normally scroll three lines at a time, to get it to scroll only one line I had to set terminal.integrated.mouseWheelScrollSensitivity to 0.08.
Also see Scrolling the terminal line by line from the keyboard for a keyboard command that scrolls the terminal by one line: workbench.action.terminal.scrollUp Ctrl-Alt-PageUp
Just add these lines into settings.json file and it will take effect instantly.
"terminal.integrated.fastScrollSensitivity" :1 ,
"terminal.integrated.mouseWheelScrollSensitivity":0.1
I've added the values as 0.1 because it was better for me , you can choose your sweet spot.
settings.json file , where you need to add the above answered values
It has been implemented in xterm
To enable smooth scrolling in VSCODE terminal, go to your settings, search for terminal smo and
simply toggle it on:

Visual Studio Code editor is not taking the entire space

Any idea on how to make the editor use the entire space?
Couldn't find much of a solution for long
Click on view and then click on Toggle Centered Layout.
I hope it will help you to solve this.
In the latest VScode versions, Toggle Centered Layout is not visible on View. You can call from command palete > View: Toggle Centered Layout.

Jupyter notebook slides use cell output as slide

I'm making slides with jupyter notebook. For one slide I made a nice little interactive plot with ipython widgets. However the interactive plot is a cell's output not input. Is there a way to capture that cell's output an use it as a slide?