vscode icon indicating copy to clipboard operation
vscode copied to clipboard

"find in selection" for notebook

Open IanMatthewHuff opened this issue 3 years ago • 10 comments

@Xinyu-Wu-0000 commented on Tue Apr 13 2021

Issue Type: Feature Request

Hope to use "find in selection" function in notebooks.

Extension version: 2021.5.743038836-dev VS Code version: Code - Insiders 1.56.0-insider (48387dfc3d691558404cff1ea2582e3862a40080, 2021-04-13T05:15:44.407Z) OS version: Linux x64 5.11.0-13-generic


@IanMatthewHuff commented on Tue Apr 13 2021

I do repro this as well. However with the new Native Notebook UI this search / find UI is controlled by core VS Code, not the Jupyter extension. I'm going to transfer this issue to their repo.

IanMatthewHuff avatar Apr 13 '21 18:04 IanMatthewHuff

@Xinyu-Wu-0000 commented on Tue Apr 13 2021

Issue Type: Feature Request

Hope to use "find in selection" function in notebooks.

Extension version: 2021.5.743038836-dev VS Code version: Code - Insiders 1.56.0-insider (48387df, 2021-04-13T05:15:44.407Z) OS version: Linux x64 5.11.0-13-generic

@IanMatthewHuff commented on Tue Apr 13 2021

I do repro this as well. However with the new Native Notebook UI this search / find UI is controlled by core VS Code, not the Jupyter extension. I'm going to transfer this issue to their repo. +1

rudiranck avatar Mar 31 '22 10:03 rudiranck

I'm kind of confused why is this considered a feature request and not a bug? Find is not respecting global search settings like "Auto find in selection".

I guess it's just semantics, but tagging this as feature seems like a way to de-emphasize its importance, but given the number of dups I'd say it's pretty important to people. This is an extremely basic functionality that's missing and apparently was present in earlier versions of vscode.

plauria avatar Aug 03 '22 19:08 plauria

Solution is given in #141493 with the F3 key which allows find in selection/cell so this can be closed

luchungi avatar Aug 04 '22 02:08 luchungi

No, it can’t. Pressing F3 doesn’t do anything differently, as I mentioned in my dup bug report.

plauria avatar Aug 04 '22 02:08 plauria

I am in vscode 1.75.0 and F3 to search and replace in a notebook cell does not work anymore, is this issue related to that problem or should I open a new one? https://github.com/microsoft/vscode/issues/141493#issuecomment-1196872284

lgonzalezsa avatar Feb 07 '23 15:02 lgonzalezsa

I'm having the same problem as @lgonzalezsa

tp-duarte avatar Mar 09 '23 18:03 tp-duarte

I am in vscode 1.76.0 and I am experiencing the same problem

sk1ddy avatar Mar 21 '23 12:03 sk1ddy

I can also confirm the same problem in 1.76.0.

eekhof avatar Mar 27 '23 10:03 eekhof

also in 1.78.2 We need F3 back

ZSZYoung avatar May 22 '23 08:05 ZSZYoung

Also in 1.80.0 This would be much needed.

gilles-zerah avatar Jul 08 '23 16:07 gilles-zerah

Any update on this?

miguelroboso avatar Jan 29 '24 23:01 miguelroboso

Helo,

I tried using the latest (1.85.2) version of VSCode, and found that: when you select and type Ctrl F, the search starts from the beginning of the notebook, while it starts from the selection for a plain file. I subsequently found that if you click again after Ctrl F, the search starts from the point of selection for a notebook too, and then the behavior is similar to the plain file's one.

Sincerely,

Gilles

Le mar. 30 janv. 2024 à 00:18, miguelroboso @.***> a écrit :

Any update on this?

— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/121218#issuecomment-1915744703, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABN6LF7FQMBD4GX343BEDZLYRAU4PAVCNFSM4233MKL2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJRGU3TINBXGAZQ . You are receiving this because you commented.Message ID: @.***>

gilles-zerah avatar Feb 01 '24 09:02 gilles-zerah

I'm also having the issue @gilles-zerah describes.

Are there any updates on making the find tool start from the cursor position?

jsulopzs avatar Apr 17 '24 07:04 jsulopzs

Is there a roadmap where the missing feature will be added? a workaround I am using is to copy the cell code in a new text file and then replace what I need in a controlled way.

lgonzalezsa avatar Apr 18 '24 14:04 lgonzalezsa

Related to work done at: #209839

This issue requests textual selections (multiple lines in a cell, etc). There is now support for cell selections upon the enabling of the newly introduced setting "notebook.experimental.find.scope.enabled": true

Yoyokrazy avatar May 31 '24 19:05 Yoyokrazy

Great! Can I use it today? I added the setting not sure what to expect in the find UI.

lgonzalezsa avatar May 31 '24 21:05 lgonzalezsa

Related to work done at: #209839

This issue requests textual selections (multiple lines in a cell, etc). There is now support for cell selections upon the enabling of the newly introduced setting "notebook.experimental.find.scope.enabled": true

Glad to hear that

ZSZYoung avatar Jun 03 '24 13:06 ZSZYoung

Great! Can I use it today?

@lgonzalezsa the search in cell selection you can 👍 if you enable the setting, you will see the new "in selection" button to the left of the arrows that let you step between results. The feature is active on insiders, and is included in the upcoming stable release as well. Here's a video of how it currently works, and I'll be working to expand functionality for textual selections (in addition to cell selections) this month.

https://github.com/microsoft/vscode/assets/12552271/ef6dacb5-cdb4-4ada-b1ef-47f86d6214bf

I added the setting not sure what to expect in the find UI.

Without the setting enabled, you will not be able to see the "in selection" button within the find widget when you are using a notebook editor. When enabled, the button should be visible.

Yoyokrazy avatar Jun 03 '24 16:06 Yoyokrazy

It is not working for me, I added it to the bottom of my settings file as follows:

image

lgonzalezsa avatar Jun 03 '24 19:06 lgonzalezsa

Hm, interesting. Could you check which version of vscode you are running? The feature would only be available in a recent insiders, and not until stable 1.90 is released this week. This can be checked via the help menu -> About.

Could you also check if the setting is visible in the settings UI? Searching just for "notebook find" should populate the setting.

Yoyokrazy avatar Jun 03 '24 20:06 Yoyokrazy

Got it! seeing it now in 1.90 was waiting for that feature to be enabled again! helps a lot, THANKS!

lgonzalezsa avatar Jun 06 '24 17:06 lgonzalezsa

Hello, Thanks a lot for the features, very useful! Is it correct that when I change the scope to another cell by pointing the mouse there, I have to redo the Find in cell (otherwise, the search remains focused on the same cell) ?

Thanks again

Le ven. 31 mai 2024 à 21:29, Michael Lively @.***> a écrit :

Related to work done at: #209839 https://github.com/microsoft/vscode/issues/209839

This issue requests textual selections (multiple lines in a cell, etc). There is now support for cell selections upon the enabling of the newly introduced setting "notebook.experimental.find.scope.enabled": true

— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/121218#issuecomment-2142863910, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABN6LF7C2ARIJ7SVN4G3I6LZFDFP7AVCNFSM4233MKL2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJUGI4DMMZZGEYA . You are receiving this because you were mentioned.Message ID: @.***>

gilles-zerah avatar Jun 06 '24 19:06 gilles-zerah

Yes, the "Find in Selection" button needs to be toggled off and on again to change the selection. This is currently the same behavior that works for standard editor "Find in Selection" in regards to changing the selection. The decorations applied to the cells are a good indicator of the range you will be searching within.

Yoyokrazy avatar Jun 07 '24 16:06 Yoyokrazy