Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IPython Notebook keyboard shortcut search for text

Tags:

Is there a keyboard shortcut to search for text in an IPython Notebook?

I looked under Help | Keyboard shortcuts and there are lots of cool shortcuts but none for searching for text?

enter image description here


The notebook is running in FireFox on Ubuntu.

like image 579
SpeedCoder5 Avatar asked Jan 31 '16 21:01

SpeedCoder5


People also ask

How do I search a notebook in Python?

To search inside a notebook, use the find+replace shortcut, F , in command mode. For example, on Kaggle, Esc for command mode, then F to trigger find. Or open command palette with Cmd+Shift+P on Mac, Ctrl+Shift+P on Linux/Win. Then just type "find" in it.

What is Ctrl Z in Jupyter Notebook?

Jupyter lab: ctrl + z shortcut only for selected cell rather than all modified ones. Ask Question.

Does Ctrl C working in Jupyter Notebook?

If you desperately need to stop something that is running in iPython Notebook and you started iPython Notebook from a terminal, you can hit CTRL+C twice in that terminal to interrupt the entire iPython Notebook server.


2 Answers

There is a find-and-replace command in Jupyter. It's key binding is F (command mode):

enter image description here

Of course you can find text with the browser's functionality, (I find it sometimes better), but the command in Jupyter is also very useful. I use a lot that function Replace in selected cells when I copy-paste a bunch of code and then change variables or something like that:

enter image description here


(Note: You can launch the Command Palette with shift+ctrl+P, and browse or run other commands)


like image 132
Luis Avatar answered Oct 13 '22 16:10

Luis


Enter Command Mode by pressing esc, followed by find and replace key binding f, so

esc then f

Take the User Interface Tour (Help Menu) if you haven't already

like image 29
Omar Abusheikh Avatar answered Oct 13 '22 18:10

Omar Abusheikh