From 909dad929c87d2a14c29b399000ffb0c27e1f024 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 17 Feb 2016 16:58:20 -0500 Subject: [PATCH] Zooming...like with tmux! --- vimrc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/vimrc b/vimrc index a88a43a..9222eb2 100644 --- a/vimrc +++ b/vimrc @@ -250,6 +250,21 @@ function! HLNext (blinktime) redraw endfunction +" Zoom / Restore window. +function! s:ZoomToggle() abort + if exists('t:zoomed') && t:zoomed + execute t:zoom_winrestcmd + let t:zoomed = 0 + else + let t:zoom_winrestcmd = winrestcmd() + resize + vertical resize + let t:zoomed = 1 + endif +endfunction +command! ZoomToggle call s:ZoomToggle() +nnoremap z :ZoomToggle + " Set special case colors function! SetColors() highlight CursorLine cterm=NONE ctermbg=234