My Command History can get pretty large and I often find myself wanting to find a command I executed a couple of weeks ago (otherwise I may have to go find the command in the doc again). I used to have to hit ctrl-F and bring up the Find dialog to search through the history. While that works, it feels a bit heavyweight for the task at hand. Other options include scrolling around an looking for the command or using up arrow in the Command Window.
We added a new feature in R2007a that will help you find items in the Current Directory browser or Command History by typing right on these components. In past releases, these components only had one key type searching (i.e. they would only find the first letter of the key typed). Now, I can just start typing multiple keys the command in the history and the match is selected in the history. Below I typed “fig” and the most recent item that matches is selected. I can see what has been typed in the tooltip that appears at the top of the window.
I can keep typing to further search for the item.
If I find a match, but it is not the one I want, up arrow will take me to the next match. If I want to copy all of the or delete all occurrences, ctrl-a will select all of the matches. In this next screenshot, I hit ctrl-a (or command-a for fellow mac users) to select all the matches.
If no match is found, the tooltip will indicate that it did not find a match.
You can also search for files in the Current Directory browser with this new feature.
Let me know how you like this new feature.
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.