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?
The notebook is running in FireFox on Ubuntu.
There is a find-and-replace
command in Jupyter. It's key binding is F (command mode):
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:
(Note: You can launch the Command Palette with shift+ctrl+P, and browse or run other commands)
:Embarassed: "Running in" means use the browser "find text on this page" shortcut. Firefox shortcut for this is ctrl - F.
As of Jupyter Lab v1.0.2 the CTRL+F twice press trick described in my comment above doesn't seem to work anymore.
I found the internal search functionality of jupyter lab pretty annoying, since it only searches in the current cell. I wanted to directly access the native browser search with CTRL+F.
To disable jupyter lab search function (and use browser search instead):
- open Settings\Advanced Settings Editor
- add the following to User Preferencec:
{
"shortcuts": [
{
"command": "documentsearch:start",
"keys": [
"Accel F"
],
"selector": ".jp-mod-searchable",
"disabled": true
}
]
}
This will override the System Default, with "disabled": true
added, and enables Browser CTRL+F in all Jupyter Lab instances.
- Select the cell(s) in which you want to replace.
- Then just click outside those cells
- Press f.
You are done!
来源:https://stackoverflow.com/questions/35119831/ipython-notebook-keyboard-shortcut-search-for-text