Get old Find & Replace window back?

As of release R2022a, "Find & Replace" has been moved to a small pop-up menubar at the top right corner of the editor. Annoyingly, the 'Replace' part of the manubar is collapsed by default, which means whenever I want to replace some text in my code, I need to click the little arrow to the left of the menubar. In previous releases, when "Find & Replace" opened in a separate window, navigating to the 'replace' text box was possible with two keyboard shortcuts (CMD-F and tab to move to the Replace text field) and did not require using the mouse. This may sound pedantic, but I find this new "feature" rather disruptive to my workflow.
Is there a way to get the old 'Find and Replace' window back or at least have the Replace part of the new menu bar be expanded by default?
Thanks!

6 Comments

I agree! The new tiny window is a joke and almost invisible to me on my 4K display.
John you nailed it!
I also want the old find and replace window back. The new one is in a fixed location near the upper right of the document. This obscures important information in the first 2-4 lines of the file being edited (depending on if the replace option is opened). There is no way to scroll the file to be able to view this portion of the file being edited. I find no way to move or undock the location of this window.
When I do a Ctrl-F in a Simulink model to search for some text, the first thing I do when the small interface at the upper-right of the screen opens is to click on the icon that looks like a small spreadsheet. This opens the Search dialog along the whole bottom of the window where the search results will show up. Unfortunately, the field to enter the search string cannot be resized and all the options are stil buried behind the gear icon, but it is the best way I have found to use the new search interface. In my opinion, this change to the search interface was a big step down from the previous interface (and I still feel that way after using it now for a couple years). I cannot figure out how this change is considered an improvement.
Default search interface at upper-right corner of the window:
After clicking the spreadsheet icon to move the interface to the bottom of the window (and have access to a couple more icons):
As discussed in this MATLAB Answers post, here some more updates related to Find and Replace bar position, history and wrapping respectively.
  • From MATLAB R2022b, the find and replace dialog box will no longer obscure the code as when it overlaps the find result, the editor will move downward.
  • You can use the down arrow to show a list of previous searches in R2021b. Starting in MATLAB R2023a, there is a visual hint indicating that you can do so:
  • Enable and disable wrapping is one of our top priority issues and we are working on a solution. For now, starting in MATLAB R2023a, you can use the "Find in selection" option to perform search and replace in selection instead of the entire script to narrow down the scope of the search. https://www.mathworks.com/help/matlab/matlab_prog/find-and-replace-text-in-files.html
Francesca, yours must be the ugliest work on earth, having to defend an infuriating editor downgrade like this. This editor is obviously much worse than the previous one, in many aspects. Why don't you just let us opt out of it? Get the previous editor? The inability to disable wrapping is so annoying, and such a basic thing, that I don't understand how this sh*tty editor even got to see the light in the first place. It's like you are just wanting to annoy users for no reason (since the old editor is still there). The only reason I can imagine for this is that it is cheaper for you (do you have to pay some other company for the old editor?), but you already charge a lot of money for your software. Don't make the experience so annoying, because even the best can lose their position in the market.

Sign in to comment.

 Accepted Answer

Steven Lord
Steven Lord on 7 Apr 2022
Open the Preferences using the button in the Environment section on the Home tab of the Toolstrip.
Under MATLAB, expand the Keyboard section of the tree and select the item Shortcuts underneath it.
If you search for "Replace" using the search box immediately below the Active Settings dropdown it will tell you the shortcut to open the Replace dialog directly. On my Windows machine it is Ctrl-H so on your Mac I suspect it will be CMD-H but you can check and change it to something else if you so choose.

16 Comments

⌥⌘F on Mac.
Awesome, I did not know there was a replace shortcut. Thanks heaps for that!
I still want to know how to get the old find/replace window to come up. I know I am behind the times, but our company still uses R2013b (which has the find/replace window that I want) and we also use R2016b (with the find/replace interface I really, really dislike). Is there a preference or config option that will display the old find/replace window instead of the new interface?
Sorry, that code has been removed from the newer release. They switched editors completely, away from the old java based one, as part of their effort to move away from Java.
Ed Callway
Ed Callway on 16 Nov 2022
Edited: Ed Callway on 16 Nov 2022
This is totally nasty. As previous poster noted, on a 4k monitor the new find/replace box is tiny and nearly invisible.
And when working with multiple windows on multiple large monitors it's now ALWAYS in the wrong place - up in the far right, well away from the central focus editing area. Getting so much neck exercise snapping my head around.
When I'm doing a lot of F/R it's been super convenient to move that window either right beside the text I'm working on = real close, or off the side side of the window = obscuring nothing.
Just tried 2022b, running back to 2020b screaming in pain.
Is there a GoFundMe to bring this very useful feature back??
Absolutely no user ever cares about what language is used to write an editor, only about the features it has - or now doesn't have.
Ed Callway
Ed Callway on 16 Nov 2022
Edited: Ed Callway on 16 Nov 2022
And far far worse than miniaturizing the now non-window, the functionality of F/R has been crushingly reduced.
Typical F/R when doing things like changing variable names might be finding 5 different things and replacing them with 5 others.
Then going to another area and repeating those ops.
Before this change, the F and R lines had a drop down that stored previous choices so they could be QUICKLY reused.
Gone Gone Gone!!!
Totally, brutally terribly unnaceptable. Such a new time waster.
I do miss the history. And it is a nuisance that the find window is always upper right: that interferes with being able to read long first lines of a file.
Absolutely no user ever cares about what language is used to write an editor,
They do, however, care about having to pay Oracle license fees per desktop .
Switching away from Java was not just a matter of changing computer languages: it was getting away from the Oracle license fees, and it was switching technologies to webapps / HTML5 / CSS .
It does still store a few of the previous search strings. Use the down arrow to bring up a list box containing a short list of previous search strings.
I don't disagree that there a large number of issues with the new editor. One of my main annoyances it that there is no longer an overwrite mode.
How brutal, just from the descriptions...I've not upgraded yet past R2020b; looks like better stop at R2021x
Does TMW not get serious beta tester input on stuff like this before releasing into the wild?
Looks like one could have to revert to using the external editor option to be able to get some features; that, of course, then breaks all the other builtin features that are useful.
If they're going to change horses, at least need the new nag to be able to do as much as what the old one could, first.
Michael Miller
Michael Miller on 30 Mar 2023
Edited: Michael Miller on 30 Mar 2023
Thank you dbd. I am looking for a way to move or undock the location of this popup window. Is there a way? My issue is that the winodow obscures important information in the first 2-4 lines of the file being edited (depending on if the replace option is opened), even when this portion of the file includes the string being searched for!
Les Beckham
Les Beckham on 30 Mar 2023
Edited: Les Beckham on 30 Mar 2023
R2023a has alleviated this concern, although in a strange way. If the search/replace string is in one of those first few lines, and would be covered up by the search/replace tool, the editor moves the entire file contents down so that the string isn't obscured.
Here's an example
Thank you Les Beckham. Mathworks is taking baby steps in the right direction.
Yes. They appear to be trying.
My main remaining complaint is that there is no overwrite mode (the Ins key does nothing in the editor).
Les Beckham: I have installed 2023a but the behavior is still the same. I don't get the file moved down as you do. The Find or Find/Replace pop up obscures the file being edited. I have looked through all preference settings and find nothing relevant. I am running on Linux. Am I missing something or is this an OS dependent issue?
Thank you!
Never mind. I just reread your post to realize that you stated it moves the file only if the searched for string is located underneath the popup. That does work in my Linux version. Thx

Sign in to comment.

More Answers (1)

Sergio Silva
Sergio Silva on 17 Mar 2023
Another question regarding the "Find & Replace" tool. On R2021a, there were options "match case", "whole word" and "wrap around".
On the new tool (R2022b), I can see "match case", "whole word" and "regular expression", but no "wrap around", which I use frequently on R2021a.
Am I missing something? How can I find/replace only up to the end of file with the new tool?
Thanks!

2 Comments

Hi Sergio, just FYI, the "wrap around" option was re-added in R2024a as a setting and is available as a UI option in a future release. Take a look at this entry in the release notes for more info. You can also click the "Find in Selection" button to limit search and replace within the selection:
Thanks for your reply. I'll check it out when R2024a is available at my institution. Best, Sergio

Sign in to comment.

Categories

Products

Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!