mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-12-22 23:31:32 +01:00
vim: add WinZoomToggle <leader>wz
This commit is contained in:
parent
8bb46eec61
commit
bb3a47e282
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue
Block a user