Skip to content

Instantly share code, notes, and snippets.

@stober
Created August 23, 2012 22:35
Show Gist options
  • Save stober/3442845 to your computer and use it in GitHub Desktop.
Save stober/3442845 to your computer and use it in GitHub Desktop.
Split the view on a single file.
import sublime_plugin,sublime
class SplitPaneCommand(sublime_plugin.WindowCommand):
def run(self):
if self.window.num_groups() == 1:
self.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]]
})
self.window.run_command('clone_file')
self.window.run_command('move_to_group', {"group": 1})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment