Sublime Forum

How to open Sublime with Default Window Size (optionally default layout as well)

#1

Hi,

I am using Sublime Text 3 on my Ubunto machine. And the frustration part is that every time I open Sublime in a folder, it would be in this small window size (regardless of what my previous file/project were). Further more, I always code in two columns mode. It’s frustrating I have to change to two columns mode every time as well.

Is there anyway to specify my preferences in Preferences.sublime-settings – User to always open Sublime with a default width and height and with a certain layout?

Thanks
Ryan

0 Likes

#2

Bump! Any update/idea on this?

0 Likes

#3

I’m a recent new user of Sublime Text. But since you had no reply and I’m curious to learn more (and also on Ubuntu) I ran subl --help to see command line options available.

https://www.sublimetext.com/docs/commands

It seems that you can open a project using subl --project
and the window size should be remembered according to what I read.

Another approach I tried as an experiment (on Ubuntu) was to use GUI Actionaz for automation (it is in the Ubuntu Software Centre or look in Synaptic Package Manager … but is available for Windows users).

https://wiki.actiona.tools/doku.php?id=en:start

By writing System > Command you can call subl to open a project.

if you wish you can add further automation actions by referring to the shortcuts in Sublime toolbar

e.g. New File is Ctrl+N.

I guess you could refine automation script by adding Sublime commands.

Each command may take one or more parameters, which may be enclosed in quotes. For example, the command to insert the string Hello World!, followed by a newline, is:

insertCharacters “Hello World!\n”

{Later edit]

I found this thread which is relevant …

0 Likes

#4

Thanks Eureka for replying! I guess I am not the only one that ran into this and it always felt to me it’s such a simple and needed feature that Sublime should help support (imagine all those other crazy features Sublime already does). The issue with me is that in my development enrionment I most often need to do subl . meaning just open a folder and that usually is not associated with a project. So my coding environment doesn’t associate with a project and that project keeps changing. So the project remembering the setting doesn’t quite work for me. I will take a look at actiona then…

0 Likes

#5

Playing with Actionaz I can launch Sublime Text by simple script

command subl
Pause
set to 2 column mode by adding Action > Key > Shift+Alt+2

You can see the key shortcuts in top menubar View > Layout.

0 Likes

#6

[Later edit]

Actually I now see where/how to resize Sublime window …

In Actionaz …

Add Window action
Window title: *(UNREGISTERED)* … (choose a suitable target window title … you can use wildcard * in search pattern)
Action: Resize
Resize width: 800 … (as an example)
Resize height: 600 … (as an example)

Try it out … you might have to add Pause (2 seconds) between Actions.

You can also use the cross-hair button to the far right of Window title field to locate a target window.
Hover over cross-hair button and read tooltip for instructions.

“Target a window by clicking this button, moving the cursor to the wanted window and
releasing the mouse button”

0 Likes

#8

This preference will tell Sublime Text to open the same size as when it was closed:

"remember_full_screen": true,

Tested on MacOS.

0 Likes

#9

I created the Sublime account here JUST to answer this question correctly, because I had the same annoying issue.

I fixed this bug by three simple steps

  1. Put this on the Preferences.sublime-preferences
"remember_full_screen": true
  1. Open the sublime

  2. Resize MANUALLY the sublime window to the size you want (maximum height and width)

:point_up:

After I followed this steps, now everytime I open the sublime (even with subl), the sublime opens on the last window that I MANUALLY resized it.

0 Likes