The search/replace tool in VS Code Jupyter Notebooks is different from it with other type of files. First it doesn't come with the shortcut such as alt+w for "match whole word". Second, it always start from the first occurrence in the result list instead of the current position. Third, it doesn't come with "Find in selection" option, which makes the "replace all" function almost un-useful. Why is that and is there way to fix it?
Things are different because the implementation is not exactly the same as for find and replace for text documents as for Jupyter Notebook editors (see also custom editor API).
Match Whole Word should be supported. It works for me in VS Code 1.81. At least- the button in the find-widget does, but yeah- the keyboard shortcut does not work as it does for text document editors. I raised an issue ticket: https://github.com/microsoft/vscode/issues/192034.
Find in selection was an open feature-request: https://github.com/microsoft/vscode/issues/121218. Progress was made with #209839 (required notebook.experimental.find.scope.enabled
in Insiders), and is apparently completed by Support Textual Selections in notebook find widget #216840.
I can reproduce the behaviour with not going to the next occurrence from the cursor/caret/current-selection in find in VS Code 1.81. This might be related: https://github.com/microsoft/vscode-jupyter/issues/13088. Actually, https://github.com/microsoft/vscode/issues/154913 might be a better match to what you described. If not, raise an issue ticket about it. I tried searching for other existing related ones and had difficulty (I googled "site:github.com vscode issues jupyter notebook find next occurrence -site:github.com/jupyterlab/jupyterlab/issues -site:github.com/jupyter/notebook/issues
").
See also Commands to find previous/next occurence of a string on a ipynb notebook on vscode.
Some related update history: https://code.visualstudio.com/updates/v1_81#_rich-content-search-for-closed-notebooks.
Some related docs: https://code.visualstudio.com/docs/datascience/jupyter-notebooks#_search-through-notebook.
Some related history: https://devblogs.microsoft.com/python/notebooks-are-getting-revamped/.
More related history: https://github.com/microsoft/vscode/issues/140098.
An example of another historical difference from find with text documents: Option for seeding find string from editor on ctrl + f #20768.
Another difference (purportedly soon to be fixed in v1.85): Inconsistency in "Replace" between text files and notebooks #184290