ordering open .m files in the windows menu.

5 次查看(过去 30 天)
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

采纳的回答

Image Analyst
Image Analyst 2012-8-5
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?

更多回答(1 个)

Oleg Komarov
Oleg Komarov 2012-8-5
编辑:Oleg Komarov 2012-8-5
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.

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by