Sublime Forum

How to set a default layout for SB3

#1

I’d like to be able to set a default layout when opening new files and folders in SB3, specifically a 2-column view.

Ideally I would also like to specify the window size. I have looked on the support pages but not found any solutions to this yet.

Thanks,
Sam

0 Likes

#2

Hi. Maybe i am a bit late.

I created a py file (the name is not relevant) in “Packages\User” with the following content:

import sublime
import sublime_plugin

def plugin_loaded ():
    sublime.active_window().run_command ("toggle_distraction_free")
    sublime.active_window().run_command ("set_layout", {
        "cols": [0.0, 0.5, 1.0],
        "rows": [0.0, 1.0],
        "cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
    })
0 Likes