Open williamstein opened 2 years ago
Another intersting point -- what Frederic is implementing in JupyterLab has the intention that if a file is open and not saved, he wants to have the search actually search the version in memory (not on disk), and it prints a warning about things being slightly stale. I hadn't thought of that case, but it's a good idea. That said, I think whenever you hide a tab to view the search tab, any background tab probably gets saved to disk in a second anyways, so maybe this isn't important.
Note -- we have the "in memory" files on the backend too.
Another point he discusses is jumping to the location in the file that matches a search, and points out that this is very subtle for Jupyter notebooks. CoCalc is just dumb in this case, but I think what Frederic implemented is even dumber (which is opening the notebook as a plain text json file).
IIRC, VS Code uses ripgrep (see https://github.com/microsoft/vscode-ripgrep, for example)
CoCalc also doesn't have replace functionality at this level, but what Frederic wrote appears to (?), and ripgrep does. So a big advantage of switching is an easy way to do replace.
See https://github.com/BurntSushi/ripgrep