Save Open State in Editor???

11 visualizaciones (últimos 30 días)
dpb
dpb el 17 de En. de 2020
Comentada: dpb el 18 de En. de 2020
Is there no preferences option to have editor reload previous state w/o having to open each and every file again? Very rude behavior...

Respuestas (1)

Steven Lord
Steven Lord el 17 de En. de 2020
In the Preferences for MATLAB, there's a section titled Editor/Debugger. One of the options that you can select (and I believe is selected by default) is "On restart reopen files from previous MATLAB session". However I believe under certain circumstances (like if MATLAB crashes) that may not always work.
Or do you mean you accidentally or intentionally closed a file (or all the files) and want to undo that action? I don't believe there is a way to undo that, but it seems like a reasonable enhancement request.
As a third option, if you want to be able to "remember" what files are opened, close some and/or open others, then restore the "remembered" set of files I think the projects functionality in MATLAB may be of interest to you. That functionality was introduced in release R2019a.
  6 comentarios
Les Beckham
Les Beckham el 18 de En. de 2020
I'm pretty sure that Matlab saves the editor configuration when Matlab itself is closed. If you close the editor while Matlab is still open you are basically telling Matlab "I'm done with this editor session and you can completely forget about it". If you close Matlab with an open editor session and then restart Matlab, the configuration of the editor will be restored as it was when you last closed Matlab. This seems relatively intuitive if you think of Matlab, and all of its associated windows as an IDE. When closed, the IDE configuration is saved, and when opened, it is restored.
I've used Matlab this way for years (I always have my editor session open when I close Matlab and it re-opens when I restart Matlab -- ready to pick up where I left off).
It sounds like you are concerned about having the editor open when closing Matlab because of a fear of losing possibly unsaved edits. I'm pretty sure that if you close with an unsaved edit you will be prompted to save or discard your changes.
Try it and see. Projects are a cool addition but, I think, aren't really relevant to your issue.
dpb
dpb el 18 de En. de 2020
"t sounds like you are concerned about having the editor open when closing Matlab because of a fear of losing possibly unsaved edits"
I'm more concerned about the files themselves than an edit or two...if it's reliable to ensure never an open/dangling handle.
I suppose if one is used to just leaving the editor open and can prevent the reflex action of closing it (take a lot of retraining for a very old dog on that one :) ) that would end up similarly-behaving.
Agree projects as typically defined in IDEs is not what am looking for at all.

Iniciar sesión para comentar.

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by