Is there a shortcut for "select next occurrance"?
-
@Beriol
First, since you have picked to rename a variable in code, this tells me nothing about whether VS is doing a textual replacement or a symbol replacement. Your example is quite different from the earlier one of formatted text/sequence of words. Where does VS Code support formatted text?Anyway. I've told you what your two choices are in Creator here:
-
Refactor > Rename.
-
Select an area and Ctrl+F.
[EDIT @sierdzio's Ctrl+Shift+R is just a shortcut for Refactor > Rename. Note that this may change multiple files.]
-
-
That's not it either :(
That would change all occurrences in the file (and in the project actually), and it seems to work only for variables (but maybe I'm doing something wrong). What I'm looking for is for any string, not just variables. It should just select occurrences of the selected text, no matter what it is (just like the famous CTRL+F3, but that it actually selects the occurrences for editing).
-
@JonB My bad with the example, it's a textual replacement. Any text can do, doesn't have to be a variable.
Yeah, I know of Ctrl+F of course, same as rename. That doesn't solve it though :(
Isn't there a way to create a macro or is there a plugin that could help?
EDIT: so, Just to recap, I literally need a version of the CTRL+F3 that also selects the occurrences it's processing, that's it.
-
@Beriol said in Is there a shortcut for "select next occurrance"?:
That would change all occurrences in the file (and in the project actually)
Depends on scope. If you select a local variable (like in the GIF you posted) it will only rename it inside of that function.
-
@Beriol said in Is there a shortcut for "select next occurrance"?:
Yeah, I know of Ctrl+F of course, same as rename.
If you mean going via Ctrl+F is same as Rename, it is not. For a start, Ctrl+F will do your "textual" replace, which Rename will not.
-
@JonB I didn't mean that, I meant that it doesn't solve the problem. Come on, I know you're trying to help and I really appreciate it (I do), but it sohuld be clear what I need right now, isn't it? No point in marking these problems, it's not helpful...
EDIT: yes, it does the textual search, but it doesn't "easily" allow to replace the strings, unless you're replacing them one at the time or all of them at once.
So, Just to recap, I literally need a version of the CTRL+F3 that also selects the occurrences it's processing, that's it.
-
Hi @Beriol,
so it seems what you want to do is an extension or special mode of QTCREATORBUG-16013. You may comment and vote there.
Regards