Sublime Forum

Open folder in the same windows do not work (Linux)


I am using Sublime Text version 3.2.2 Build 3211a registered Sublime Text.

Ubuntu 20.04 with POP OS from System 76. I did a test and I got the same problem with Ubuntu 20.04.

User Settings (copy)

“always_show_minimap_viewport”: true,
“bold_folder_labels”: true,
“caret_extra_width”: 2,
“caret_style”: “bar”,
“close_windows_when_empty”: true,
“color_scheme”: “Packages/Predawn/predawn.tmTheme”,
“ensure_newline_at_eof_on_save”: true,
“fade_fold_buttons”: false,
“font_face”: “Monaco”,
“font_size”: 11.5,
“highlight_line”: true,
“highlight_modified_tabs”: true,
“line_padding_bottom”: 1,
“line_padding_top”: 1,
“open_files_in_new_window”: false,
“tab_size”: 4,
“theme”: “Default.sublime-theme”,
“translate_tabs_to_spaces”: true,
“trim_trailing_white_space”: true

open_file_in_new_window is set to false.

Opening a folder open a new window.

I did try (unzipping, changing and zipping) default settings for Linux (setting “open_files_in_new_window”: false) without ANY changes.

I did try to start Sublime with NO plugins and ONLY these user settings.

// Settings in here override those in “Default/Preferences.sublime-settings”,
// and are overridden in turn by syntax-specific settings.
“open_files_in_new_window”: false,

NO difference. Opening a folder open a new window.



This is an extremely bad idea; when Sublime updates, your changes go away. The appropriate way to modify settings is to use Preferences > Settings and put your settings in the right hand side of the window, which override the defaults.

That said:

	// Mac only: When files are opened from finder, or by dragging onto the
	// dock icon, this controls if a new window is created or not.
	"open_files_in_new_window": true,

This setting only applies to MacOS, so on Linux it doesn’t matter where or how you change it. It also applies only to files and not to folders.

In order to open a folder in the currently active window, the action you take needs to specify -a to Sublime to tell it that you want to add the folder without creating a new window:

tmartin:dart:~/local/sublime_text_3_3211> ./sublime_text --help
Sublime Text build 3211

Usage: sublime_text [arguments] [files]         Edit the given files
   or: sublime_text [arguments] [directories]   Open the given directories

  --project <project>: Load the given project
  --command <command>: Run the given command
  -n or --new-window:  Open a new window
  -a or --add:         Add folders to the current window
  -w or --wait:        Wait for the files to be closed before returning
  -b or --background:  Don't activate the application
  -h or --help:        Show help (this message) and exit
  -v or --version:     Show version and exit

Filenames may be given a :line or :line:column suffix to open at a specific

How you do that depends on the windowing system you’re using however.



Thanks for your reply. I did unzipping, changing and zipping on a temporary installation.

Well I did not know it was only for Mac-OS. It is not indicated in the documentation.

Thanks for the tip and it is working. I can see multiple folders in the Side Bar, now.

Thanks again for your time. Keep safe.