Sublime Forum

How can I force new windows to be maximized?

#1

When I close Sublime, it will save the location of my window fine (maximized), but when I press ctrl+shift+N to open a new window, it’s not maximized, small, and spanning multiple monitors. I know there are shortcuts to position the window but I’d rather not have to every time, especially when it’s 4 extra steps (win+right x 3 then win+up)

0 Likes

#2

currently this isn’t possible without an external window manager

2 Likes

#3

You you’re on Win 7+ you can press win+up to maximize window. It’s an extra step, nonetheless, but easier than moving the mouse :slightly_smiling:

1 Like

#4

I had forget that. Now I remembered, I just created a AutoHotKey script to maximize my Octave’s Graphics.

With this you can maximize the Sublime Text Settings window when it is opened automatically.
This script is looking for a window’s title which starts with Preferences.sublime-settings:

#persistent

SetTimer, check_for_sublime_settings_window, 1000

SetTitleMatchMode 1
Return

check_for_sublime_settings_window:
{
    WinWait, Preferences.sublime-settings
    WinMaximize
    
    SetTimer, check_for_sublime_settings_window, 1000
}
Return

References:

  1. http://stackoverflow.com/questions/40981048/how-to-start-an-infinity-loop-on-autohotkey-when-reloading-the-script
0 Likes

#6

you could try something like https://www.displayfusion.com/

0 Likes

#7

as @kingkeith said, it’s not possible to make sublime text remember the fullscreen setting. But, I posted a little trick that allows you to make it remember it’s size (not the position though).

For the position, I’m guessing that it matters because you have several screens. It seems logic (at least to me) that your text editor is on the main screen. And a window not explictely placed will be shown on the main screen, so you just have to define it (if you’re on window, I can help you find where it is).

Matt

1 Like

#8

This preference will tell Sublime Text to not only remember full-screen, but to open the same size as when it was closed:

"remember_full_screen": true,

Tested on MacOS.

1 Like

#9

I was able to force new windows to maximize with this following approach

  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.

1 Like

#10

Resizing Manually once after adding the settings did the trick. Thanks.

0 Likes

#11

I can’t reproduce that on Linux - adding "remember_fullscreen": true to settings and then restarting restores full-screen windows without having to resize them first. What platform are you using and what version of ST?

0 Likes