How to find and replace text in a single cell when using Jupyter extension inside Visual Studio Code

Question:

As the title says, how to find and replace text inside a single jupyter cell when using the jupyter extension in Visual Studio Code? I am familiar with ctr+h but that will replace all the occurrences in the entire jupyter notebook file. This is a really important feature for me, as I am using it a lot in jupyter on the browser.

Asked By: Falco Peregrinus

||

Answers:

You can select the first occurrence and then use Ctrl+D. It will select the next occurence in the cell. Repeat that until you go back to the first ocurrence and then type the new value. It will replace all the values your circled on.

In case you have changed that keyboard shortcut or if it is different you can find the correct one:

shortcut

Answered By: Ssayan

2023-02-09 update

For the most updated VSCode, select something you would like to replace, and then F2.

enter image description here


Original answer

F3 do the trick. It first shows the "Find" widget for a single cell. Then click the triangle on the left, which will be expanded to a "Replace" widget.

enter image description here

Answered By: W. Ding

try select a cell and use Ctrl+g as I just found out accidentally.

Answered By: Saphisle