Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Open files and folders in same window in Sublime Text on macOS?

If I open ~/foo.txt then open ~/baz/bar.txt from Terminal, Sublime Text always opens 2 different windows. It's aggravating to have all these different windows open..

I've tried changing a bunch of ST's settings, but nothing seems to fix this.

Is there a way to have ALL files and folders just open up in the same window as if I were manually adding all these folders to the project?

like image 545
corysimmons Avatar asked Jan 09 '14 14:01

corysimmons


People also ask

How do I open multiple windows in Sublime Text?

To do so, you need to press Ctrl+K, then Ctrl+Shift+Up. You can repeat as many times as you like. Press Ctrl+K, then Ctrl+Shift+Up to open a new sub-window.

How do I open tabs in Sublime Text?

You can double click on the file to open them in a new tab.

How do I display folders in Sublime Text 3?

You have to add a folder to the Sublime Text window in order to navigate via the sidebar. Go to File -> Open Folder... and select the highest directory you want to be able to navigate. Also, 'View -> Sidebar -> Show Sidebar' if it still doesn't show.


2 Answers

In Sublime Text Menu:

Preferences ->  Settings - User 

Look for 'open_files_in_new_window'

And change 'true' with 'false'

like image 106
BENARD Patrick Avatar answered Oct 12 '22 16:10

BENARD Patrick


Rather than editing the SublimeText default settings (as Jahnux73 suggested), you should go to Preferences -> Settings - User, and add the following:

"open_files_in_new_window": false, 

The SublimeText default settings file should not be modified, as it may be overwritten by Sublime updates, and so that you'll always be able to restore the default settings. The way Sublime works is that at runtime, it reads and applies the default settings, and then reads and applies the Settings - User file. In the event of a conflict, the User settings take precedence. That way, you can add your own settings without modifying the default configs.

like image 21
Eliza Weisman Avatar answered Oct 12 '22 15:10

Eliza Weisman