Qt Creator Search and Replace
Solved
Qt Creator and other tools
-
Important tips:
- In-Selection Search and Replace does not work on a partial line - you must have at least one newline selected (The selection overlapping into the next line even if no text is selected).
- Regular expressions must be properly escaped if you wish to use the mode to find certain strings be sure to read up on regex, every symbol can be escaped to do normal text matches but you may just want to turn it off temporarily.
- This is important for workflows and fast-paced usage: Go into your text editor options and find the search scope highlight colors, set it to something super-obvious. For me I went with black text on yellow background. This way you are never mistaken on just what is going to get replaced. This way, if I don't see the black-on-yellow test I know right off the bat its gonna be a whole-file search. Use your subconscious powers to your advantage :3
- Finally, to clarify about regular expressions, they do in fact work (at least now they do) with selection-scoped searches unlike what it used to be. As long as the search scope is showing, the selection will be replaced.
- Be sure to set the selected text highligting (not the search scope highlighting, the one that higlights every occurance) to something less distracting or your mind might confuse it with 'search highlight'. I see a lot of themes/styles can cause this, so be careful about that.
To review: 1) selection scope is based on the highlight, be sure to set it up (many themes set this to a not-so-useful setting, so check it) 2) use highlights to guide you and you'll soon be able to make decisions about searches without thinking based on why you see