New Script keeps opening in new window instead of a tab

So, stupid question. I accidentally did something on my script file and now when I hit new script, it opens a new script in a new window instead of a new tab. Can someone tell me what I did and how to reverse it.
Thanks

1 Comment

There can't be a simpler description of my problem. Never thought would find it here.

Sign in to comment.

 Accepted Answer

The only thing I can think of is to go to the small downward-pointing arrowhead in a circle in the upper right of the Editor’s toolstrip (the tooltip for it is ‘Show Editor Actions’, click on it, click on ‘Dock Editor’ and see if that works. According to the menu, CTRL+D might have the same effect.

72 Comments

wow you are my hero!! thanks
THANK YOUUUUUUUUUUHYKNJKLHKHJNFKKHSDIOHGSFDGHDKJGHDKJGHGHKLJGHDKJGHDGKJ;HRE;GIEHRAGIODRHGH;KARTGH;ETARAJDDJREGA'REJTGRA'K
SHINAPHADH DAMRONGSIRI - Thank you!
it's funny that i replied to a 6 years old comment and the author still reply us
For those who are finding it on the main window, the arrow is on the Live script after you create one.
(worst frustrating 10 min of my life)
Thanks, It works for me at R2020a in Windows 10
CTRL+D didn't work for my but CTRL+Shift+D did.
Thank you! CTRL+Shift+D worked really well for me
thank you, same thing happened to me
Danke!!! -means thanks you in German ;))
ABSOLUTE BEAST CHEERS
Thank you hero since 2014, from a tired engineer at 1.31 am working on a project.
Thank goodness for this answer. I was going crazy with the multiple windows! I'm on a mac and it started with the recent update. I assumed it was a pain I'd now have to live with. I'm glad I looked it up because it was getting quite annoying!
It is my continuing pleasure that this is helping so many people!
You have saved our lives we are eternally grateful
8 years later and this is still helping people thanks so much!
THANK YOU omg haha clearly there has been a design failure since this is affecting so many people, but really appreciate the help
Thank you so much! 10 years later this still helps!
My pleasure!
(A Vote would be appreciated!)
Still works, +1 and thanks.
My pleasure!
A Vote would be appreciated!
My pleasure!
A Vote would be appreciated!
A very quick way to fix this, if docking and moving windows around isn't working well for you is:
1) Click the Home tab
2) Click the down arrow under Layout, under the Environment section
3) Click the Default setting.
This will return all the window to their original position, with the script up top, the Command window at the bottom, Workspace(variables&values) to the right, and current folder to the left.
Also, greetings from February 2025!
I tried to do what you did but the script still doesn't appear on my window. Do I have to reinstall matlab ?

Sign in to comment.

More Answers (4)

Sylvain Cornelus
Sylvain Cornelus on 23 Mar 2019
Edited: Sylvain Cornelus on 23 Mar 2019
Just to add to Star Strider's repsonse:
In case people are having trouble finding it, look for the very top right blue bar, grey circle and down arrow, "Dock filename.m"
CTRL+SHIFT+D was the default command for me in R2018b.

14 Comments

I confirm this is working also with R2019, Thank you!
Confirm this works in 2020a, Thank you!
Works for me 2019b update5. Thanks
@Michael Magid: I almost lost hope. You kept me binding.
works like a charm, share love, cheers
CTRL+SHIFT+D Perfect (R2021b)
CTRL+SHIFT+D Perfect (R2022b)

Sign in to comment.

The above answers works just fine. Another thing though, if you want the editor to be in a separate window and tab for each function, you can drag it OUT of docking in the MATLAB workspace window.
A very quick way to fix this, if docking and moving windows around isn't working well for you is:
1) Click the Home tab
2) Click the down arrow under Layout, under the Environment section
3) Click the Default setting.
This will return all the window to their original position, with the script up top, the Command window at the bottom, Workspace(variables&values) to the right, and current folder to the left.
wasif
wasif on 20 Dec 2025
Edited: wasif on 20 Dec 2025
ctrl+shift+D
choose dock editor, thanks.

Categories

Find more on Graphics Objects in Help Center and File Exchange

Products

Asked:

on 31 Jul 2014

Commented:

on 22 Mar 2026 at 17:18

Community Treasure Hunt

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

Start Hunting!