vscode-modaledit
vscode-modaledit copied to clipboard
Proposal for simpler search options
The new master has a handy set of options in incremental search—e.g. typeBeforeNextMatch
typeAfteNextMatch
and so forth.
As I understand it, these help to avoid problems where searching and then moving back in typeAfterAccept
, for example, leads the next search to hit the same point in the file.
However, another solution is to simply check if the search motion actually moved the cursor after completing the entire command. If not, you repeat the command, searching "twice" before terminating (e.g. add an offset to indexOf
in a second call after the first call to indexOf
).
You could have a single option, skipRepeats
. When turned on, this would re-run the search as described above. This is a little inefficient, in that you have to search twice for each step, but the front facing interface is a lot simpler for people to think about.