Sublime Forum

How to set default output directory

#1

I use Sublime 4 and have a question about undesired behavior.

Whenever I open an existing file and try to save it under some different name Sublime always offers some other random directory as initial location for storage. Is there a way to say to sublime if the file you opened is in /tmp dir offer me /tmp dir as initial storage choice?

0 Likes

#2

What platform are you on and what version of Sublime Text are you running?

0 Likes

#3

I use Sublime Text 4 build 4113
OS: elementary OS 5.1.7 Hera (Ubuntu 18.04 based)

0 Likes

#4

How are you opening the file? Does it happen in safe mode?

0 Likes

#5

No safe mode at all.

Example:

  1. Create new project
  2. Save project file in a separate dir (/home/user/projects)
  3. Add folder to project - /home/user/foo
  4. Folder contains some files and directories
  5. Open random file for editing (/home/user/foo/test.txt)
  6. Try to save as - Sublime offers a subdirectory inside /home/user/Documents
0 Likes

#6

Is there some debug mode I can turn on if that helps?

0 Likes

#7

Safe mode is the debug mode, as it temporarily reverts Sublime Text to a freshly installed state. Does it happen in safe mode?

0 Likes

#8

It behaves exactly the same, the only difference is that instead of offering a subdirectory of /home/user/Documents now I get /home/user/Downloads as initial directory

0 Likes

#9

Are you using Gnome or some other DE? Does it use the GTK open file dialog?

0 Likes

#10

Elementary OS has it’s own shell (Pantheon) and window manager (Gala), it is however based on GTK hence the dialogs are using GTK file dialogs.

0 Likes

#11

Does anything change if you enable/disable the environment variable GTK_USE_PORTAL? (set it to either 0 or 1.

0 Likes