Jupyter Notebook Search while using Collapsible Headings

I’m working on some pretty long Jupyter Notebook files. I’m keeping them organised with markdown headings and I’m using the NBextension ‘Collapsible Headings’ to only open the code I want to see in a given moment. The one issue I’ve had with this so far is that when I want to do a cntrl-F search, it only seem sto search through the code that is displayed on screen. That means most code, which is collapsed under its heading at any given time, is not searched. This is very inconvenient. Does anyone have a way to get around this?

One of my ideas was to somehow uncollapse all headers at once. That would make all code available to be searched. Ideally, it would also come with a re-collapse button, which would return the collapse/non-collapsed state to what it was previously. I would also be happy with a collapse-all button/operation. Anyway, that’s just one. Anyway, I wasn’t able to figure this out either.

Any help is greatly appreciated, thanks!

Leave a Comment