vim: add WinZoomToggle <leader>wz

feature/symbol-search
bretello 2020-03-09 17:58:39 +01:00
parent 8bb46eec61
commit bb3a47e282
1 changed files with 19 additions and 0 deletions

View File

@ -110,3 +110,22 @@ highlight DiffText cterm=bold ctermfg=10 ctermbg=88 gui=none guifg=bg guibg=Re
" \ 'dir': '(dist|build)$',
" \ }
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard']
function! WinZoomToggle() abort
if ! exists('w:WinZoomIsZoomed')
let w:WinZoomIsZoomed = 0
endif
if w:WinZoomIsZoomed == 0
let w:WinZoomOldWidth = winwidth(0)
let w:WinZoomOldHeight = winheight(0)
wincmd _
wincmd |
let w:WinZoomIsZoomed = 1
elseif w:WinZoomIsZoomed == 1
execute "resize " . w:WinZoomOldHeight
execute "vertical resize " . w:WinZoomOldWidth
let w:WinZoomIsZoomed = 0
endif
endfunction
nnoremap <leader>wz :call WinZoomToggle()<CR>