plugin/threesomelib/util/windows.py @ 02506b7b8b92

I has a loupe!
author Steve Losh <steve@stevelosh.com>
date Sun, 12 Jun 2011 23:33:31 -0400
parents adb7e3942b34
children bb3247356f22
import vim
from io import error


def focus(winnr):
    vim.command('%dwincmd w' % winnr)

def close(winnr):
    focus(winnr)
    vim.command('wincmd c')

def close_all():
    for winnr in range(len(vim.windows) - 1):
        close(winnr)

def split():
    vim.command('wincmd s')

def vsplit():
    vim.command('wincmd v')