ordering open .m files in the windows menu.

조회 수: 5 (최근 30일)
Truman
Truman 2012년 8월 5일
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