Editor: Disabling Collapse of Tabs on Double-Click

11 visualizaciones (últimos 30 días)
Thomas Carpenter
Thomas Carpenter el 16 de Ag. de 2021
Comentada: Benjamin Tessler el 15 de Jul. de 2025
When using the docked editor in MATLAB, you can snap different files to different parts of the editor (e.g. have them side by side, above-below and so forth).
The problem is that when you double click on one of the tabs, frequently unintentionally, all of the docked windows collapse into a single view (i.e. they are no longer side by side).
When you are working on multiple files at once and have them neatly arranged, having them all suddenly collapse and loose order is highly frustrating. Is there any way to disable this double-click shortcut?
  8 comentarios
Thomas Carpenter
Thomas Carpenter el 15 de Jul. de 2025
@Benjamin Tessler Which version of MATLAB have you tried that in? It doesn't work in R2022a.
Benjamin Tessler
Benjamin Tessler el 15 de Jul. de 2025
I actually just made some functions related to this. The getTabs is only for 2025a, I think. But if you have the filenames as a cell array you can use the other functions to reopen the tabs.

Iniciar sesión para comentar.

Respuestas (1)

vamshi sai yele
vamshi sai yele el 14 de Sept. de 2022
Hello,
I understood that you want to retain the tailored view and don not want to miss it as it takes lot of time to set things back into the place.
I can certainly understand how frustrating it is because even I have faced the same issue in the beginning, but thanks to MATLAB, it gave an option to save our tailored view and can get back to it with a single click.
Here are the steps to get that done. Firstly, set up the MATLAB view you wish to have on your screen like placing different MATLAB windows in different positions.
I would like to add a point here to make a customized view in a simple way.
In the "View" panel, there are good number of options to tailor MATLAB view as required.
Without struggling much in dragging things on the screen to set up the position, instead we can try those options like "Custom" windows or "Left/Right" and "Top/Bottom" and "Tab Position" and "SPLIT DOCUMENT" options. Just in case if you want to have all the files in single editor window without any customization, simply click on "Single" option at the left corner.
So, coming to our original discussion of having the customized view handy, once you tailor the view as per your requirements, got to "Home" and click on "Layout" to see the available options. Among them select the "Save Layout" and give a name to the layout. Now everything is set to go.
From now on, to get back to your favourite view, just click on the laylout option and select the saved one and MATLAB will fall into your favourite customized view.
Hope you will find it helpful!
  1 comentario
Alain
Alain el 14 de Sept. de 2022
Thanks. I just tried your suggestion but I am afraid that the positions of the docked windows inside the editor are not included in the saved layouts. Just tried it. Saved my layout as per your suggestion, double-clicked one tab in the editor (all docked tabs got undocked as sadly expected). Reloading my saved layout did unfortunatelly not restore the original tabs location inside the editor...
Being able to save the layout of the tabs in the editor would be a cool feature... But simply being able to diasable the double-click event on the editor tabs would be a good-enough start for me.

Iniciar sesión para comentar.

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by