Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Find & Replace in Jupyter Lab

There's an option in Jupyter Notebooks where you can select some cells, and then hit F, which opens up a Find & Replace feature.

This shortcut doesn't work in Jupyter Lab. It's not in the Commands list and it's not in the Edit Menu (there is only Find -- and Find Next and Find Previous). Nor can I find a global (not specific to a cell selection) Find & Replace feature.

Does this feature exist? I've found old mentions of it on the internet -- has it been removed? I'm using Jupyter Lab version 1.2.3.

like image 406
Denziloe Avatar asked Dec 27 '19 09:12

Denziloe


People also ask

How do I get a percentage from two numbers?

Answer: To find the percentage of a number between two numbers, divide one number with the other and then multiply the result by 100.

How do you do percents in math?

In mathematics, a percentage is a number or ratio that can be expressed as a fraction of 100. If we have to calculate percent of a number, divide the number by the whole and multiply by 100. Hence, the percentage means, a part per hundred. The word per cent means per 100.


1 Answers

The Find & Replace feature was not removed, but the way it is named in the menu (simply Find...) and the UI which requires the user to click on a small arrow to access it may be confusing. Please see the GIF below which demonstrates how to use the search & replace feature:

enter image description here

If you need a slightly more powerful refactoring tool (i.e. distinguishing the variable scopes) you may want to check out my jupyterlab-lsp project which now includes support for the rename action (see here for a demonstration GIF).

like image 91
krassowski Avatar answered Sep 19 '22 19:09

krassowski