Skip to content

Instantly share code, notes, and snippets.

@stober
Created August 23, 2012 22:36
Show Gist options
  • Save stober/3442853 to your computer and use it in GitHub Desktop.
Save stober/3442853 to your computer and use it in GitHub Desktop.
Unsplit a pane.
import sublime, sublime_plugin
class UnSplitPaneCommand(sublime_plugin.WindowCommand):
def run(self):
if self.window.num_groups() == 2:
for view in self.window.views_in_group(1):
#TODO check modified?
self.window.focus_view(view)
self.window.run_command('close_file')
self.window.run_command('set_layout',
{
"cols": [0.0, 1.0, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1]]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment