How to have a tab just displaying the "source code" without potentially many pages of output

Ah… I have learned to “right-click → New view for NoteBook” to have two tabs mirror each other doing the same thing so that I can stay in one “fix” place rather than to keep drifting around when I run notebook and debug.

If the left tab can contain just the pure source code and the right tab consists of regular source + output that means I am closer to the conventional programming model where I won’t get distracted by tonnes of output and I could go from cell to cell without the interruption of painfully skipping the “useless” output.
I mean, if I am interested in the output, I could just refer to the right tab.

Is this feature available?

1 Like

In JupyterLab, you can choose View > Render Side-by-Side. By default, it seems to show the input and output as 50-50 split in the pane real estate; however, there’s a thin gray bar to the right of the input cell that you can slide way over to the right to make the input have most of the room.

Also under View is Collapse All Outputs. Whenever new output gets made, that output cell gets expanded again. I wonder if there is a way to a keyboard shortcut to quickly trigger the collapse again?
If there was also a way to trigger that by a shortcut, that would get you most of the way there without making an extension.

I do note that when you do trigger running a single cell and it ‘opens’ again, you can click the thin blue bar that comes up when you hover to just the right of the thin real estate adjusting bar, and the output cell will collapse ‘closed’ again.



Alternatively, it seems you may want to use the Jupytext extension and edit your notebook as markdown or text that is paired with a notebook that gets updated upon saving (or reloading?) as the extension keeps them sync’d. The introduction towards the top of that page and the listed use cases seem reminiscent of what you seek in your developing experience.

Yes, I would be great to have that option. Something like Matlab Live Editor 's implementation.