cursorless
cursorless copied to clipboard
Create scope type for link in a chain of field accesses
In the following code:
foo.bar.baz(whatever).bongo;
This scope type would capture each of foo, bar, baz, baz(whatever), and bongo, and include the . in the removal range.
This scope type could work in many languages
See also https://github.com/cursorless-dev/cursorless/pull/954#issuecomment-1243636384. The scope type in that PR is equivalent to https://github.com/cursorless-dev/cursorless/issues/473 applied to this scope type, so some of the questions there may be good test cases for this scope type
Languages
- [ ] Python
- [ ] C / C++
- [ ] Java
- [ ] C#
- [ ] Typescript
- [ ] PHP
Do you mean that this would result in multiple selections?
no
but the "every" version of this would result in multiple selections
Had a use case yesterday where I wanted to bring an access after a function call. Eg
aaa.bbb()
ccc()
I wanted to do "bring access bat after cap", but had to settle for "bring access bat after call cap"
I just found myself having code aaa.bbb() and wanting to say "chuck access" to result in bbb()