Solved Qt Creator Search and Replace
-
@JonB, you are not correct, and this is a further concern I have with QtCreator's way of doing search and replace. The UI of this feature does everything differently than everyone else. Ctrl+Shift+F opens the "advanced search" and there you can choose the scope (except scope=selection).
-
@Patrick-Fromberg
OK, I have gone and had a look. Are you perchance falling foul of https://forum.qt.io/topic/33369/solved-search-and-replace-within-selection. Are you aware that it seems you must select at least one "newline" in your selection before replace in selection seems to work?? If I select multiple lines replace works in selection scope, if I have only one line selected (and not its terminating newline) then the Replace All does the whole file. ?When it is going to work in selection only you get to see the selected section outlined with a box, and that's where Replace All does its stuff.
-
@JonB , no this is not my problem but further proof that search&replace is cursed in creator.
-
Unexpectedly nobody has a problem. So one very simple last question.
Shift+Ctrl+F3 works for me but Ctrl+F3 "Find next selected" never did. I work with Linux/KDE. Both shortcuts are not configured in KDE and both work in other applications. Can anyone reproduce? -
Shift+Ctrl+F3 works for me but Ctrl+F3 "Find next selected" never did.
Both work for me (Windows+Ubuntu/Unity).
Regards
-
@Patrick-Fromberg said in Qt Creator Search and Replace:
I am using > 30 extensions and I do not know which ones are standard and which ones not.
The obvious thought is: is there a simple way to try disabling all these extensions in one go, and see if it makes any difference to your issues?
-
@JonB , good point. Do you know by any chance where they are stored so I can restore my previous state?
-
@Patrick-Fromberg
Unfortunately not, because as I said I don't really use QtCreator, and if I do I don't have any plugins! However a quick Google gives, say, https://doc.qt.io/qtcreator/creator-faq.htmlYou can disable the Qt Creator plugins, at the expense of losing functionality:
Launch Qt Creator from command line, with the -noload QmlProfiler -noload QuickDesigner arguments.
Disable the plugins permanently by selecting Help > About Plugins.
or https://doc.qt.io/qtcreator/creator-cli.html, ah ha there I see:
-noload all
Disables all plugins.? So you don't have to move them, you can just run up a session without loading any?
-
@JonB , thanks, I did not know
qtcreator -noload all -load Core -load CppEditor
. Unfortunately it did not solve the problem but it was worth a try.But I believe I know a bit more now about the Help problem. "Blocked by extension" probably refers not to a QtCreator extension but to a browser extension hence not really anything to do with QtCreator.
-
@aha_1980 , are you using KDE or something else?
-
-
Ok, QtCreator passes
Ctrl+F3
to KDE for desktop selection while other applications capture that shortcut for themselves (Kate for e.g.). When I disable the shortcut in KDE, then it works in QtCreatorRegarding Search&Replace with selection scope, it is sadly not supported for Advanced Search. I probably remembered wrongly that it once worked. This is really strange because search and replace in a selection is a really common task.
-
Regarding Search&Replace with selection scope, it is sadly not supported for Advanced Search. I probably remembered wrongly that it once worked. This is really strange because search and replace in a selection is a really common task.
I'm not sure why you need the advaced find for that if it works with normal search&replace? Symmetry?
Otherwise, creating a suggestion for that is easy to do ;) - please post a link here if you do so.
Regards
-
@aha_1980 No, normal search&replace does not work with regular expressions. But I can actually do search and replace with regex limited to selection scope if I use FakeVim.
-
No, normal search&replace does not work with regular expressions.
It does. Hint: the small icon in the left corner of the search text.
Regards
-
@aha_1980 Oh yes indeed. Clicking the mini-magnifier gives me regex. Great!