feedback icon indicating copy to clipboard operation
feedback copied to clipboard

Improve string replacement workflow within a cell

Open mootari opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe.

At the moment replacing all occurrences of a string within a single cell feels overly complicated:

  1. The author has to open the find/replace modal.
  2. If the author had selected a search string in their code, it will only be prefilled in the search field if the search panel was opened via the keyboard shortcut.
  3. The search will start at the top of the notebook, so the author will have to identify the cell again that they had focused earlier.
  4. Each replacement creates a new notebook version, inflating the overall number of versions.

Describe the solution you'd like

When doing replacements within a cell I'd like to avoid the search panel altogether. Instead I'd like to have a shortcut that adds a cursor to each highlighted occurrence of the selected string (highlighted in green). This would allow me to edit all occurrences simultaneously, without having to add cursors one by one.

Alternatively, a better integration with the search panel:

  • Prefill the text selection into search field even when opening the search via the sidebar button.
  • Start searching at the last focused cell, ideally also at the selected string.

mootari avatar May 20 '22 08:05 mootari