Skip to content

Instantly share code, notes, and snippets.

@fmoralesc
Created September 3, 2014 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fmoralesc/c2401ec50a4e49947443 to your computer and use it in GitHub Desktop.
Save fmoralesc/c2401ec50a4e49947443 to your computer and use it in GitHub Desktop.
get current windows.
function! WindowsData()
let data = []
let i = 1
let i_win_width = winwidth(i)
let i_win_height = winheight(i)
while i_win_width != -1 || i_win_height != -1
call add(data, {'nr': i, 'width': i_win_width, 'height': i_win_height})
let i += 1
let i_win_width = winwidth(i)
let i_win_height = winheight(i)
endwhile
return data
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment