Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Sublime Text 2 Layout: Grid: 6
// "Cols" and "Rows" specify the coordinates in x and y.
// Cells create cells by indexing the rows and cols array in the order [startx, starty, endx, endy].
// Edit your Main.Sublime-menu file
// Mac: /Users/yourMacName/Library/Application Support/Sublime Text 2/Packages/Default
// PC: C:\Users\yourPCName\AppData\Roaming\Sublime Text 2\Packages\Default
// Example Below:
{
"caption": "Grid: 6",
"command": "set_layout",
"args":
{
"cols": [0.0, 0.33, 0.66, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells":
[
[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1],
[0, 1, 1, 2], [1, 1, 2, 2], [2, 1, 3, 2]
]
}
}
@williamborba

This comment has been minimized.

Show comment Hide comment
@williamborba

williamborba Jul 9, 2013

// grid 8
{
"caption": "Grid: 8",
"command": "set_layout",
"args":
{
"cols": [0.0, 0.25, 0.50, 0.75, 1.00],
"rows": [0.0, 0.5, 1.0],
"cells":
[
[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [3, 0, 4, 1],
[0, 1, 1, 2], [1, 1, 2, 2], [2, 1, 3, 2], [3, 1, 4, 2]
]
}
}

// grid 8
{
"caption": "Grid: 8",
"command": "set_layout",
"args":
{
"cols": [0.0, 0.25, 0.50, 0.75, 1.00],
"rows": [0.0, 0.5, 1.0],
"cells":
[
[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [3, 0, 4, 1],
[0, 1, 1, 2], [1, 1, 2, 2], [2, 1, 3, 2], [3, 1, 4, 2]
]
}
}

@dissidently

This comment has been minimized.

Show comment Hide comment
@dissidently

dissidently Jan 8, 2014

Where do I put this to make it work?

Where do I put this to make it work?

@Sawtaytoes

This comment has been minimized.

Show comment Hide comment
@Sawtaytoes

Sawtaytoes Dec 14, 2017

In your Key Bindings configuration file. You can find it by going to Preferences > Key Bindings. You will want to assign it to a key. Look at the default keys on the left-side that you can use as a template.

In your Key Bindings configuration file. You can find it by going to Preferences > Key Bindings. You will want to assign it to a key. Look at the default keys on the left-side that you can use as a template.

@jlehtinen

This comment has been minimized.

Show comment Hide comment
@jlehtinen

jlehtinen Apr 12, 2018

Grid of 9 cells:

[
  {
    "caption": "Grid: 9",
    "keys": ["super+alt+7"],
    "command": "set_layout",
    "args":
     {
      "cols": [0.0, 0.33, 0.66, 1.0],
      "rows": [0.0, 0.33, 0.66, 1.0],
      "cells": 
      [
          [0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1],
          [0, 1, 1, 2], [1, 1, 2, 2], [2, 1, 3, 2],
          [0, 2, 1, 3], [1, 2, 2, 3], [2, 2, 3, 3],
      ]
    }
  },
  {
    "caption": "Grid: 12",
    "keys": ["super+alt+8"],
    "command": "set_layout",
    "args":
     {
      "cols": [0.0, 0.25, 0.5, 0.75, 1.0],
      "rows": [0.0, 0.33, 0.66, 1.0],
      "cells": 
      [
          [0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [3, 0, 4, 1],
          [0, 1, 1, 2], [1, 1, 2, 2], [2, 1, 3, 2], [3, 1, 4, 2],
          [0, 2, 1, 3], [1, 2, 2, 3], [2, 2, 3, 3], [3, 2, 4, 3]
      ]
    }
  }
]

Why? For the sole purpose of teasing my colleague who swears by a single cell, even though these fit comfortably on a retina iMac screen for some small files.

jlehtinen commented Apr 12, 2018

Grid of 9 cells:

[
  {
    "caption": "Grid: 9",
    "keys": ["super+alt+7"],
    "command": "set_layout",
    "args":
     {
      "cols": [0.0, 0.33, 0.66, 1.0],
      "rows": [0.0, 0.33, 0.66, 1.0],
      "cells": 
      [
          [0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1],
          [0, 1, 1, 2], [1, 1, 2, 2], [2, 1, 3, 2],
          [0, 2, 1, 3], [1, 2, 2, 3], [2, 2, 3, 3],
      ]
    }
  },
  {
    "caption": "Grid: 12",
    "keys": ["super+alt+8"],
    "command": "set_layout",
    "args":
     {
      "cols": [0.0, 0.25, 0.5, 0.75, 1.0],
      "rows": [0.0, 0.33, 0.66, 1.0],
      "cells": 
      [
          [0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [3, 0, 4, 1],
          [0, 1, 1, 2], [1, 1, 2, 2], [2, 1, 3, 2], [3, 1, 4, 2],
          [0, 2, 1, 3], [1, 2, 2, 3], [2, 2, 3, 3], [3, 2, 4, 3]
      ]
    }
  }
]

Why? For the sole purpose of teasing my colleague who swears by a single cell, even though these fit comfortably on a retina iMac screen for some small files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment