Open Adrodoc55 opened 1 week ago
Feel free to make a suggestion, and even to submit a PR for it. Note that it must not conflict with an already attributed shortcut (in Preferences > General > Keys). You can try adding your suggestions for the Multi Caret Up/Down commands in that page to ensure they work fine.
This can be implemented easily with the use of the FindReplaceLogic
class. This action should be modeled after the FindNextAction
Ah, it seems like I misunderstood, what you'd like is basically a "Also select next occurrence" ?
Ah, it seems like I misunderstood, what you'd like is basically a "Also select next occurrence" ?
Yes, after maybe rename and autocomplete, this is probably my most used shortcut in VSCode, because it is soo useful. There it's called editor.action.addSelectionToNextFindMatch
and has the shortcut CTRL+D
: https://code.visualstudio.com/docs/editor/codebasics#_multiple-selections-multicursor
In VSCode it works like this:
addSelectionToNextFindMatch
then the selected text is entered into the find textbox and using the find-replace options (case-sensitive & whole-word) the next occurence is selected by a new cursor.addSelectionToNextFindMatch
. I don't feel strongly about this part and don't really see much of a benefit in replacing the find text nor in keeping the previous text.addSelectionToNextFindMatch
causes those cursors to select their current word. If it was only one cursor it then writes this text into the find textfield and activate both the case-sensitive and whole-word option.
addSelectionToNextFindMatch
until you do anything else with any cursor. Unlike the replacement of the find text the changes to case-sensitive and whole-word are not persisted into the find and replace overlay. I think this part is important.addSelectionToNextFindMatch
, but VSCode only does so when it's a single cursor. However this is not important, because this basically never happens in reality.I hope I covered all edge cases.
For reference if anyone finds this helpful here is the implementation of this feature in VSCode: https://github.com/microsoft/vscode/blob/3b82f2a5ec39744f0461824fc3fcde33e3eb6547/src/vs/editor/contrib/multicursor/browser/multicursor.ts#L338
I'm wondering: if I were to implement this feature (not sure yet if I'll find the time) I am not sure if I would be able to open a PR on GitHub, because GitHub requires 2FA which I won't activate for various reasons. Would you accept a change that I provide via a fork hosted on another host such as https://codeberg.org?
Would you accept a change that I provide via a fork hosted on another host such as https://codeberg.org/?
I don't think we could do this easily. 2FA is required to prevent from some supply-chain attacks; workflows that bypass 2FA are considered unsafe by the Eclipse Foundation.
Let's make sure issue is not already fixed in latest builds first.
Suggestion
It seems to me like this issue has been forgotten for a few years even though development was already started: https://bugs.eclipse.org/bugs/show_bug.cgi?id=576377 I am working with eclipse almost every day and for me this is one of the (if not the) most important missing features of the text editor. With "Search All" and the commands "Multi caret down" and "Multi caret up" eclipse is already soo close to supporting this. It would be a blessing if this feature got added and searching though the internet I came across alot of people wishing for this feature.
Since Bugzilla is deprecated and I couldn't find this issue here on GitHub I figured it might be helpful to post this here.
Community