Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find and replace within a single cell #2017

Closed
StevenCHowell opened this issue Mar 31, 2017 · 36 comments
Closed

Find and replace within a single cell #2017

StevenCHowell opened this issue Mar 31, 2017 · 36 comments
Assignees
Labels
enhancement pkg:notebook status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. tag:Design and UX tag:Feature Parity tag:Search and Replace
Milestone

Comments

@StevenCHowell
Copy link

In addition to having a "find and replace" for the entire notebook (#1074), it would be nice to have a "find and replace" within a single cell. This could be a separate hot-key command, or perhaps it could be a check-box in the document wide "find and replace", to select only the active cell. I have often wished something like this was available in the classic notebooks.

@alexandercbooth
Copy link
Member

I have often wished something like this was available in the classic notebooks.

In case it helps, this functionality is available in the classic notebook,
screen shot 2017-04-02 at 1 01 39 am

@ellisonbg
Copy link
Contributor

We would like to implement a generic search and replace extension that can have multiple UIs attached to it to provide per cell, per document and per directory search and replace. This should use such a service.

@jaypeedevlin
Copy link

Big +1 on this!

There is a 'find' and 'find and replace' menu option in lab, but I can't work out how to make them active - in what context are these usable?

image

This is an everyday feature for me in notebook, and enough for me to not use lab for day-to-day. Is there anywhere I can read to get context on why this would be supported via an extension and not as a core feature?

@saulshanabrook
Copy link
Member

This is an everyday feature for me in notebook, and enough for me to not use lab for day-to-day. Is there anywhere I can read to get context on why this would be supported via an extension and not as a core feature?

I agree. My understanding is the plan is to have this in core by 1.0, for the notebook and text editor, but to make it extensible so other widgets can also define how it's handled in their context.

@jasongrout jasongrout removed this from the 1.0 milestone Sep 5, 2018
@jasongrout
Copy link
Contributor

@saulshanabrook - are you still hoping to do this for 1.0, or Future?

@jasongrout jasongrout added this to the 1.0 milestone Sep 7, 2018
@saulshanabrook saulshanabrook modified the milestones: 1.0, Future Sep 7, 2018
@saulshanabrook
Copy link
Member

Future for me. If anyone else is planning to do it for 1.0 feel free to move it back.

@ericxyun
Copy link

ericxyun commented Feb 7, 2019

I was able to find a "search-and-replace" functionality from looking into CodeMirror. I'm not sure if you guys are planning on writing something different, but for those who are still looking for a "search-and-replace", pressing Ctrl + Shift + R seems to bring up what I believe is being discussed here.

@jasongrout
Copy link
Contributor

Thanks for posting the helpful tip.

The new prerelease we just released has a new Find functionality that works in notebooks (thanks again @aschlaep!). We're planning on expanding that to have replacement functionality too.

@Ingvar-Y
Copy link

Find and Replace was introduced in 1.0 and there are some problems with performance in large notebooks #6756

A feature to limit the scope to one/manually selected number of cells could be a part of solution.

@JunchaoJia-LSE
Copy link

Seems we still don't have this functionality in version 1.1.4?

@jasongrout
Copy link
Contributor

Nor in 1.2.1, the most recent release. Contributions and help implementing this is welcome!

@eltortuga92
Copy link

Hi! I would like to contribute to this issue. Can someone please add me as an assignee to this issue?

@saulshanabrook
Copy link
Member

Hi! I would like to contribute to this issue. Can someone please add me as an assignee to this issue?

Sure! Just did. If you are around, feel free to come to our weekly meeting as well to say hi and let people know what you are working on (not in any way required, just if you want).

@AlbertHilb
Copy link
Contributor

Hi all!
I'm already working on this. In the next days I will make a PR.

@blink1073
Copy link
Member

Great, thanks @AlbertHilb!

@ELind77
Copy link

ELind77 commented Aug 14, 2020

Any updates on this? Replace within selected cells is a pretty important part of my workflow. Would be nice to have it now that I've moved to Lab from Classic.

@one800hotline
Copy link

one800hotline commented Sep 2, 2020

This is the whole reason why I dont use Labs, i.e. the lack of this feature!

@bjorn81
Copy link

bjorn81 commented Oct 1, 2020

Seriously, no find and replace? Glad I'm leaving the tech industry shortly.

@ellisonbg
Copy link
Contributor

@bjoernmeier broader rants about the tech industry are not appropriate on this repo, please keep your comments to the issue at hand.

Clarification - JupyterLab does have find and replace, both the one-by-one and replace all variant. The issue here is discussing an additional variant that has a scope of the selected cells. This is a gap relative to the classic notebook that we should close.

@nitinmnsn
Copy link

Started using jupyterlab yesterday. Realized there is no 'F' find and replace functionality in it. Moving back to jupyter as I'm an extensive user of this feature. I will check every 6 months to see if it is there but given this issue was opened in march 2017 and still, the issue hasn't been resolved, I don't hope much.

@bjorn81
Copy link

bjorn81 commented Oct 12, 2020

@bjoernmeier broader rants about the tech industry are not appropriate on this repo, please keep your comments to the issue at hand.

Clarification - JupyterLab does have find and replace, both the one-by-one and replace all variant. The issue here is discussing an additional variant that has a scope of the selected cells. This is a gap relative to the classic notebook that we should close.

Wanting to find and replace within a cell would not be that exceptional of a use case though. Maybe some ranting is needed to get things moving here.

@S-UP
Copy link

S-UP commented Nov 16, 2020

Agreed. This is a quite basic feature that should be part of the default toolkit. If I was not forced to use JuypterLab at work I'd go with VSCode or similar. Replace in selection/cell etc. so much better.

@ELind77
Copy link

ELind77 commented Nov 21, 2020

Is there a technical blocker on this or just not a priority relative to other work? If the latter, what can we in the community do to increase the priority? Just +1 the ticket?

@jasongrout
Copy link
Contributor

not a priority relative to other work

This (you can see the many calls above for help from the community to implement this, for example.)

If the latter, what can we in the community do to increase the priority? Just +1 the ticket?

There are already lots of people +1ing this ticket. The best way to actually move this forward is to work on a PR implementing it.

@jasongrout
Copy link
Contributor

@AlbertHilb - it looks like you started working on this. Did you make any progress you could share, even if it's not fully implemented?

@pipesalas
Copy link

please, i'd love to have the 'F' functionality in jupyterlab

@wberdanier
Copy link

I love JupyterLab! But I'd really like to have this feature.

@goodwingibbins
Copy link

+1

1 similar comment
@dimdub34
Copy link

+1

@krassowski
Copy link
Member

As some users coming and commenting here are confused and think that there is no search and replace feature I will just leave a gif demonstrating how to access it:

search-and-replace

As for the search and replace in a single cell, is there a UI mockup for this?

@jasongrout
Copy link
Contributor

I see we have an image in the changelog (https://jupyterlab.readthedocs.io/en/stable/getting_started/changelog.html?highlight=replace#find-and-replace), but not in the docs. It sounds like this animation maybe would be good to add to the user docs somewhere.

@thisisreallife
Copy link

thisisreallife commented Apr 3, 2021

So, In conclusion, we still do not have find and repalace within ceil in jupyter lab?

@ellisonbg
Copy link
Contributor

ellisonbg commented Apr 4, 2021 via email

@jasongrout
Copy link
Contributor

Here is a workaround that exposes the CodeMirror single-cell find/replace for those that need search/replace in a cell, which will work until someone can contribute single-cell find/replace to the main jlab searching.

  1. Move the existing find and replace keyboard shortcut to a different key, such as Shift Ctrl/Cmd F by adding this in the user overrides of the Settings > Advanced Settings > Keyboard Shortcuts settings (this is needed because the main search/replace masks the keyboard shortcut that CodeMirror uses).
{
  shortcuts: [
    {
      command: "documentsearch:start",
      keys: ["Accel F"],
      selector: ".jp-mod-searchable",
      disabled: true,
    },
    {
      command: "documentsearch:start",
      // Choose a shortcut. Here we set it to shift ctrl/cmd F, which conflicts with the file browser shortcut,
      // so you may want to choose something else
      keys: ["Shift Accel F"],
      selector: ".jp-mod-searchable",
    },
  ]
}
  1. Now pressing Ctrl/Cmd F in a cell in edit mode invokes the codemirror search, which is scoped to that single cell.

@ivanov
Copy link
Member

ivanov commented May 10, 2021

I don't think Github sends out notification when a related PR is merged, but wanted to let those of you subscribed to this ticket know that with #10067 merged 2 weeks ago, the ability to search (and replace) within an active selection of cells will be available in JupyterLab 3.1, which hasn't been released yet, but you can install the pre-release if you're feeling adventurous.

@goanpeca
Copy link
Member

Closing :)

@isabela-pf isabela-pf mentioned this issue Jun 16, 2021
4 tasks
@aiqc aiqc added this to PickMe! in v4 <bit.ly/jupyter4> Jul 16, 2021
@aiqc aiqc moved this from NotStarted to Merged in v4 <bit.ly/jupyter4> Jul 16, 2021
@aiqc aiqc removed this from Merged in v4 <bit.ly/jupyter4> Jul 16, 2021
@github-actions github-actions bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Nov 25, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement pkg:notebook status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. tag:Design and UX tag:Feature Parity tag:Search and Replace
Projects
None yet
Development

No branches or pull requests