Notebook: Why no find and replace in python notebooks?

Created on 6 Aug 2015  Â·  11Comments  Â·  Source: jupyter/notebook

Why does the jupyter text editor have find and replace, but the python notebook does not? This is a needed feature!

Most helpful comment

Maybe it is late to add a comment but just in case : the command Esc+F in one of the cells will bring a simple find and replace a window in Jupyter Notebook.

All 11 comments

Please see other related issues, like #261 posted 14 h ago, which is on the top of the list.

Search and replace on many cells at once is a little bit trickier than in only one. And as in any open source project someone have to do the work.

If you want to try to tackle it, we can give you pointer.

(please continue comment on other issues not to keep thing spreaded),

Thanks !

Yes, please, give me a pointer.

ON master you can do Ctrl-shift-P (cmd on mac) filter for search and replace, then you should get a search and replace dialog. It needs improvement though.

Once you have it working I can point you to the relevant bit of code if you want to tinker with it.

I got it working and it is very nice. What improvements do you have in
mind? What part of the code needs to be changed?

On Sat, Sep 5, 2015 at 6:15 AM, Matthias Bussonnier <
[email protected]> wrote:

ON master you can do Ctrl-shift-P (cmd on mac) filter for search and
replace, then you should get a search and replace dialog. It needs
improvement though.

Once you have it working I can point you to the relevant bit of code if
you want to tinker with it.

—
Reply to this email directly or view it on GitHub
https://github.com/jupyter/notebook/issues/263#issuecomment-137955049.

IIRC, one of the request was the ability to unselect each replacement individually, something like a checkbox on the side of each replacement.

Also there is non "pure search", it would be nice if the replacement is empty to actually just hightlight all the matchings, and have a shortcut to scroll to next match, or select next match/ select previous match.

Hi,

(I don't know if this is the right place to ask )

is there/do you plan to add a quick shortcut that allows users to quickly find the _selected string_ ? — like in sublime text, for instance — _without_ having to type cmd+C, cmd+F, cmd+V

Thanks for your help

ps: same question, but also for 'function definition' and 'function documentation' (I know I can type
?function_name, after _opening another cell_ but still, would be useful to have something faster)

pps: another nice feature would be to make the results of the 'find-window' clickable, in a way that re-send you directly to the corresponding line/cell in the notebook

Maybe it is late to add a comment but just in case : the command Esc+F in one of the cells will bring a simple find and replace a window in Jupyter Notebook.

If you want to find an replace in every cell, please see this post. https://stackoverflow.com/questions/49933535/how-can-i-select-every-cell-in-an-ipython-notebook Basically, you have to click an extra button if you want to perform find+replace on every cell.

How can I bind ctrl+shift+f to find and replace on every cell ???
There is only a function

Jupyter.keyboard_manager.command_shortcuts.add_shortcut('s', 'jupyter-notebook:find-and-replace');

This became available in 2016: See this Jupyter blog post

Was this page helpful?
0 / 5 - 0 ratings