Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find/replace in VS Code Jupyter Notebooks

Is there a way to find and replace text for Jupyter Notebooks in Visual Studio Code. I can do it for a specific cell by clicking to that cell and pressing Ctrl+H. But I cannot find a way to do it for all the cells in the entire notebook.

This is how it looks like when I press Ctrl+H for specific cells: Ctrl+H for specific cells

like image 304
Sayyor Y Avatar asked Sep 11 '20 14:09

Sayyor Y


Video Answer


2 Answers

  1. You could click the search icon or use the shortcut key "Ctrl+Shift+H" to enter the search bar:

    enter image description here

  2. Input search content, replace content, and need/exclude files to be searched:

    enter image description here

  3. Click the "Replace All" button next to "Replace" (the position circled in the screenshot) to replace, then reopen the file:

    enter image description here

like image 154
Jill Cheng Avatar answered Sep 20 '22 09:09

Jill Cheng


This issue no longer exists in Visual Studio Code as of Version 1.59.1. You can use Ctrl + H to find/replace in the whole Jupyter Notebook.

like image 31
Sayyor Y Avatar answered Sep 20 '22 09:09

Sayyor Y