Is there an "undo selection" hotkey for using Ctrl+D to select multiple instances of text?

Godot Version

Godot 4.6.1

Question

In the Godot editor I often use the Ctrl+D hotkey to select duplicate instances of text for editing. However, I almost nearly as often select one too many and, because I can’t find a way to de-select the last instance, have to start the process from the start.

I looked in the editor settings and can see the hotkey I’m using is named “ui_text_add_selection_for_next_occurrence”. There is also a “ui_text_skip_selection_for_next_occurrence” that, as the name suggests, lets you skip the next occurrence. What I can’t seem to find is something like “ui_text_undo_selection_for_last_occurrence”.

Can anyone confirm if I’m on a wild goose chase here?

Indeed, there is no such shortcut:
https://github.com/godotengine/godot-proposals/issues?q=is%3Aissue%20state%3Aopen%20undo%20select%20next%20occurrence

It exists in every other code editor I know that has a Select next occurrence command for the reason you mentioned.

I’m adding it to my list of Proposal to open, but if you have more time to open time, please open an issue and I’ll upvote and follow it. It does seem easy to implement so I’ll also consider making a PR (but I need to get back on studying the code editor’s C++ code first).

Current workaround: use an external code editor like VSCode…

So sorry about the delayed reply. Crazy busy couple of weeks (full-time dad with lots of other stuff on the side). I’ll try to find some time in the coming weeks to open an issue for it, but if you get to it first please let me know and I’ll upvote it myself.

Regarding your suggested workaround: I actually did try to use VSCode for a while, but I’d gotten so used to the Godot editor that I kept stepping on my own toes trying to do things.

I’ve been in this situation too many times. Now I use VSCode only, specifically, when I want to rename a symbol (using F2 key). I just open the Godot project with it and leave the window aside. After refactoring and saving, Godot detects the changes and reloads the files.

I do prefer using Godot’s script editor, though. If only it had proper refactoring.