8

Is there a shortcut to close all other editors except focused one?

Previously I would open a file with option so it would show as a second editor. When I was done with the second editor, I would "close" it by using show editor only (command + return). With xcode 11, the second editor isn't part of the assistant editor. So, I can't "close" it with show editor only.

In simple terms.. Is there a shortcut to close the right editor and only show the left one.

enter image description here

Mocha
  • 2,035
  • 12
  • 29

2 Answers2

9

I think SHIFT+CONTROL+CMD+RETURN is exactly what you are looking for (Note: you should be "focused" on left editor to close right).

Helpful link about new Xcode 11 assistant editor behavior: https://www.avanderlee.com/xcode/xcode-assistant-editor/

mbabaev
  • 353
  • 2
  • 6
  • 1
    Yes -- This is shortcut answers my question. However, this seems to be a toggle.. So if I want to open a new editor, I would need to use the shortcut again. – Mocha Oct 09 '19 at 05:28
  • This doesn't answer the question. This toggles the secondary editor, as in, you can't use a secondary editor at all if you don't toggle it back. – Rad'Val Jan 29 '22 at 14:00
6

The shortcut to close the current active editor is:

ctrl + ⌥ option + ⌘ command + W

This answer contains many more options

Declan McKenna
  • 4,321
  • 6
  • 54
  • 72