In what way is the new R2021b Editor UI "improved"?

12 Ansichten (letzte 30 Tage)
I find the "new and improved" Editor UI in R2021b to be extremely irritating, in no way better than R2021a. How did this get past SQA? Following is a list of miscellaneous nuisances that I've run into:
The text search/replace box obscures the top text line in my file, which is a problem if the search text is obscured.
It isn't obvious how to revert to previous search strings in the search box.
I want to rename a variable in my m-file, and before doing so I want to ensure that the new name, "num_subset", does not already exist in the file. However, there are many occurrences of the substring "num" in my file, and as soon as I start typing in the search box it jumps to the next occurrence of "num" before I've finished typing. So now I have to go back and find the place where I was working.
In an auto-indented code section such as a while ... end block, if you insert more than one consecutive blank line in the code the auto-indenting is lost on all but one of the blank lines.
In an auto-indented block of code, if you put the cursor between two characters and press ENTER, the Editor will put in a line break with the new line indented, as expected. However, if you select (click-and-drag over) a character and press ENTER, the Editor will delete the character and replace it with a line break, as expected, but the new line will not be auto-indented.
After doing a text search you can do subsequent searches for the same text string using F3 without re-opening the search box. However, if you switch to another file (in the tabbed Editor window) F3 does not work; you have to re-open the search box. It worked in R2021a.
The search always wraps, but I usually don't want it to wrap. There appears to be no way to disable wrapping. In R2020a the search box had an option for enabling/disabling wrapping.
The behavior of Smart Indent has changed in 2020b. In 2020a all lines in a code block would be auto-indented. In 2020b the indenting of all blank lines is removed. So if you start typing in a blank line you have to either manually put in leading tabs or re-select Smart Indent.
  12 Kommentare
Walter Roberson
Walter Roberson am 19 Feb. 2023
Tips for Creating Helpful Answers
Be honest and considerate with all responses to all contributors.
Tips for Making Comments Helpful
Be aware that responses containing profanity, vulgarity, or an offensive tone will be removed.
Jan
Jan am 19 Feb. 2023
Bearbeitet: John Kelly am 21 Feb. 2023
Consider the Guidelines of this forum, which include:
Regardless of these guidelines, if moderators or administrators tell you not to do something, don't do it. They reserve the right to change or delete any content if they feel it is inappropriate.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Francesca Marini
Francesca Marini am 17 Mär. 2023
Bearbeitet: Francesca Marini am 17 Mär. 2023
Hi, this is Francesca Marini, I’m the MATLAB product manager for the desktop and editor side.
Let me first thank you all for your feedback, this is absolutely valuable to us to understand how to continuously improve MATLAB and do the best we can to meet your needs. I encourage you to keep doing so and letting us know your thoughts.
I’ve carefully read all your comments and I’ll try to respond to each of the points you listed.
Find and replace dialog box:
  • 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:
  • Starting in MATLAB R2023a, it will be once again possible to use F3 without re-opening the find and replace dialog box when switching to another file.
  • Allowing control of whether the cursor should jump to find matches while typing as well as to enable and disable wrapping are some 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
Smart Indenting of empty lines.
Automatic completion and code suggestions.
Interpretation of Monospaced fonts.
  • By default, the code font is set to monospaced to choose a fixed-width font. When the font is set to monospaced, the actual displayed font in the Editor is different than the font displayed in the Command Window and Command History. This is because monospaced is a logical font, not a physical font, and the tools are replacing monospaced by different physical fonts as the editor is using JavaScript rather than Java technology. In future releases of MATLAB this will no longer be an issue because all tools will use the same physical font. In the meantime, to avoid this discrepancy, specify the font name as a physical font, for example, Courier New. https://www.mathworks.com/help/matlab/matlab_env/change-fonts.html
Performance Issue and UI design.
  • We have been making improvements to performance and the UI design over the past few releases. My suggestion is to update MATLAB to the latest release (when possible) to get the latest updates. We also encourage you to submit detailed requests to our support team so that we can investigate any issues you are encountering.
We understand that sometimes a new release may introduce changes that may impact the workflow and we’re doing our best to improve the transition between releases and make it as smooth as possible.
I hope this was helpful!
  5 Kommentare
Felipe Jiménez Hernández
Thank you, Steven, it worked fine.
Felipe Jiménez Hernández
Felipe Jiménez Hernández am 28 Feb. 2024
But I cannot split into less than about 6 lines each. Why? Is there a way to revert to the old editor?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (2)

Giles
Giles am 13 Apr. 2023
At the very least there should be an option to re-enable the old editor.
The old editor was perfect. The new editor might become perfect in time, but we're going to have to wait years for all the problems to be worked out--and even then no guarantees. And even if it does get there in time, we're just going to end up with something resembling the old editor. I don't understand why this was done at all.
You can add the problem that it used to be easy to block-select one or more lines by clicking and dragging in the left margin. In the new editor the area where you can do that is now so thin it becomes tricky/painful to use.
Agree that auto-jumping the search while typing is a terrible idea. Might be nice if you're searching a document or the web. Not nice for coding. I don't get how that made it into version 1.
  1 Kommentar
Felipe Jiménez Hernández
Felipe Jiménez Hernández am 15 Apr. 2023
I have skipped upgrading to the latest versions just for this. You must be f* s* to worsen a product so terribly out of nowhere. For most users, a friendly programming environment is much more important than any improvements they can make under the hood.

Melden Sie sich an, um zu kommentieren.


Jan
Jan am 15 Feb. 2023
I still miss the editor option existing inMatlab 6.5, which allowed to provide the selected text as input to functions defined by the user. This could be defined directly in the menu of the editor. Sigh.
The introduction of the ribbon style in R2012b was a hard stroke already (see: https://www.mathworks.com/matlabcentral/answers/48070-experiences-with-release-2012b )
  2 Kommentare
Steven Lord
Steven Lord am 15 Feb. 2023
I still miss the editor option existing inMatlab 6.5, which allowed to provide the selected text as input to functions defined by the user.
I'm not 100% sure what you're describing, but I've done something like this with shortcuts or favorites in MATLAB. Open a document in the MATLAB Editor and select some text, then run this code (almost certainly won't work in MATLAB Answers.)
s = matlab.desktop.editor.getActive().SelectedText
You might want to safeguard this a bit before using this in your code by checking that matlab.desktop.editor.getActive returns a non-empty output. You could also use this in conjunction with the clipboard command to copy the SelectedText to the clipboard.
Jan
Jan am 16 Feb. 2023
@Steven Lord: Thanks for this useful suggestion.
As far as I remember, the mentioned feature was in the "Tools" menu of Matlab 6.5, where a list of functions could be defined and triggered by hot keys. The input was the current selection and maybe this selection was replaced, if the function had outputs.
Unfortunately my virtual machine with WinXP crashed and I cannot find the old documentation currently. Actually FEX: EditorMacro could fill this gap, but I have some doubt concerning the stability of this tool.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Desktop finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by