cursorless icon indicating copy to clipboard operation
cursorless copied to clipboard

Support custom paired delimiters

Open NikolaiKircher opened this issue 3 years ago • 2 comments

Use Case:

Given(/^We navigate to the homepage$/) do
  driver.navigate.to "http://google.com/"
end

I would like to be able to comfortably select the text We navigate to the homepage

Solution: Custom paired delimiters

One possible solution would be to introduce the ability to define custom paired delimiters

Similar to the way take inside box works - it selects everything between [ and ], i would like to be able to define a new paired delimiter.

e.g. take inside regex should select everything between ^ and $ or maybe even with multiple characters: take inside stepdefinition to select everything between (/^ and $/)

NikolaiKircher avatar May 03 '22 17:05 NikolaiKircher

Question: do we want to support wrapping with these by default?

pokey avatar Jun 08 '22 13:06 pokey

See also #335. I think the differences here are the following:

  • These pairs would support different opening / closing delimiter, whereas #335 requires them to be the same
  • These pairs require the user to configure them, whereas #335 defines a command for on-the-fly pairs

pokey avatar Jul 06 '22 07:07 pokey

Question: Should custom matching pairs affect/modify the pair/any scope?

AndreasArvidsson avatar Jul 05 '23 15:07 AndreasArvidsson

No, I don't think so.

pokey avatar Jul 08 '23 17:07 pokey