Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Xcode 11, how do you quick-open a file in a new tab or new window?

Tags:

xcode

xcode11

Prior to Xcode 11, you could use cmd+shift+o to open the quick open menu, and then use opt+shift+enter to show the little jump dialog to decide where to open the file, e.g.

enter image description here

Note that the dialog has spots for opening in new window or new tab.

In XCode 11, with all the editor improvements (which are awesome), the little jump dialog has been replaced with some blue highlights that show up in the current window. This seems nice, but I can't figure out how to get a file to open in a new tab or new window.

enter image description here

Didn't realize how important this was in my workflow until it went away :)

like image 714
RyanM Avatar asked Oct 08 '19 16:10

RyanM


People also ask

How do I open a new tab in Xcode?

You can right-click and pick open in tab. You can also set Xcode, preferences, Navigation, Optional Navigation to Uses Tab. Then when you hold down the option key and click on a file it should open in a new tab, if it's not already open.

How do I open multiple tabs in Xcode?

Alternatively you can press CMD+T to open a new tab, which will automatically show the tab bar.

How do I open a new tab in Swift?

You can select the file you want to open in the new tab holding (don't let go) Option + Shift and then when a dialogue opens, you can click the + mark on the top right of that window.


1 Answers

When the highlighting appears

  • press then to open the file in a new editor on the right.
  • press then to open the file in a new editor on the bottom.
  • press ⌘T to open the file in a new tab.
  • press ⇧⌘T to open the file in a new window.

If multiple editors are open you can navigate with the arrow keys to specify the insertion location for the new editor.

like image 50
vadian Avatar answered Nov 08 '22 20:11

vadian