ordering open .m files in the windows menu.

8 views (last 30 days)
While this is somewhat of a nit, when you have multiple .m files open in the editor they are not displayed in alphabetical order in the Window pull down menu.
I have searched and could not find if there is a way to do this.
Is there a way to organize the open .m files in alphabetical order in the Windows pull down menu?
Thanks in advance, Truman Prevatt

Accepted Answer

Image Analyst
Image Analyst on 5 Aug 2012
Not that I'm aware of. Personally I would never use that feature. I like my editor windows ordered in a certain order, and that order is never ever alphabetical. It's usually in a kind of "order of importance" to what project I'm currently working on. My left window is always my "common_code.m" file which is a collection of code snippets that I use very frequently in many other m-files. My second tab is usually test.m which is kind of a scratchpad file where I can test out temporary scripts to get some code working before I transfer it to the main m-file. Then I have all the main m-files for the project I'm working on.
Do you know that you can click and drag an editor tab (the tabs are all lined up at the bottom of your editor window) to reposition that editor window wherever you want in relation to the other tabs for the other files that are open in the editor?

More Answers (1)

Oleg Komarov
Oleg Komarov on 5 Aug 2012
Edited: Oleg Komarov on 5 Aug 2012
right click > alphabetize
OR
It can be done using the API editor introduced with R2011a: http://blogs.mathworks.com/community/2011/05/09/r2011a-matlab-editor-api/
However, there's no sort functionality in the API, therefore it should be implemented ad hoc. I am thinking that one way would be to reopen programmatically all the .m files, but this would imply an auto-save and the undo/redo cache will be flushed.

Categories

Find more on Debugging and Analysis in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!