Skip to content

Instantly share code, notes, and snippets.

@aerosol
Created August 15, 2018 22:50
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 aerosol/75b0287bd40d69b51b5db83acebaba7b to your computer and use it in GitHub Desktop.
Save aerosol/75b0287bd40d69b51b5db83acebaba7b to your computer and use it in GitHub Desktop.
function! WinZoomToggle() abort
if !exists('w:WinZoomIsZoomed')
let w:WinZoomIsZoomed = 0
endif
if w:WinZoomIsZoomed == 0
execute "tabedit %"
let w:WinZoomIsZoomed = 1
elseif w:WinZoomIsZoomed == 1
execute "tabclose"
let w:WinZoomIsZoomed = 0
endif
endfunction
nmap <leader>z :call WinZoomToggle()<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment