Possible to open Sublime in two row layout by default?

試著忘記壹切 提交于 2019-12-13 04:38:51

问题


As a matter of personal preference I like Sublime 3 to be set to a two row layout. I can set this through the menu or via keyboard shortcut, but I am wondering if it's possible to open every window in this layout by default? I can't find anything in the Default settings file that corresponds to the layout.


回答1:


If you want to control the layout of ST then Origami is your friend.

Install it through Package Manager and you'll be able to do pretty amazing things with layouts.




回答2:


You can create a python (.py) file in your Packages\User folder like the one I have:

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]]
})

The name of the file is not relevant. In my case, I like to start with two panes in distraction free mode.



来源:https://stackoverflow.com/questions/32328340/possible-to-open-sublime-in-two-row-layout-by-default

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!