Prevent splitting while in zoom (#3)
This commit is contained in:
parent
c8b89f7679
commit
4915343011
1 changed files with 15 additions and 10 deletions
23
vim/.vimrc
23
vim/.vimrc
|
@ -1,13 +1,13 @@
|
||||||
call plug#begin('~/.vim/plugged')
|
call plug#begin('~/.vim/plugged')
|
||||||
|
|
||||||
Plug 'chrisbra/matchit'
|
Plug 'chrisbra/matchit'
|
||||||
|
Plug 'dhruvasagar/vim-zoom'
|
||||||
Plug 'junegunn/fzf'
|
Plug 'junegunn/fzf'
|
||||||
Plug 'moll/vim-bbye'
|
Plug 'moll/vim-bbye'
|
||||||
Plug 'ntpeters/vim-better-whitespace'
|
Plug 'ntpeters/vim-better-whitespace'
|
||||||
Plug 'tpope/vim-eunuch'
|
Plug 'tpope/vim-eunuch'
|
||||||
Plug 'tpope/vim-fugitive'
|
Plug 'tpope/vim-fugitive'
|
||||||
Plug 'tpope/vim-surround'
|
Plug 'tpope/vim-surround'
|
||||||
Plug 'troydm/zoomwintab.vim'
|
|
||||||
|
|
||||||
" languages
|
" languages
|
||||||
Plug 'tpope/vim-rails'
|
Plug 'tpope/vim-rails'
|
||||||
|
@ -18,7 +18,7 @@ call plug#end()
|
||||||
|
|
||||||
" STATUS LINE
|
" STATUS LINE
|
||||||
set statusline=
|
set statusline=
|
||||||
set statusline+=%<\ %f%{ZoomState()}
|
set statusline+=%<\ %f%{zoom#statusline()}
|
||||||
set statusline+=\ %m%r%y%w%=
|
set statusline+=\ %m%r%y%w%=
|
||||||
set statusline+=\ Line:\ %l\/%L\ [%p%%]
|
set statusline+=\ Line:\ %l\/%L\ [%p%%]
|
||||||
set statusline+=\ Col:\ %v
|
set statusline+=\ Col:\ %v
|
||||||
|
@ -131,12 +131,17 @@ map <Leader>pu :PlugUpdate<cr>
|
||||||
let g:terraform_align=1
|
let g:terraform_align=1
|
||||||
|
|
||||||
" zoomwintab.vim
|
" zoomwintab.vim
|
||||||
nnoremap <C-w>z :ZoomWinTabToggle<CR>
|
nmap <C-w>z <Plug>(zoom-toggle)
|
||||||
nnoremap <C-w><C-z> :ZoomWinTabToggle<CR>
|
nmap <C-w><C-z> <Plug>(zoom-toggle)
|
||||||
function! ZoomState()
|
let g:zoom#statustext='Z'
|
||||||
if exists('t:zoomwintab')
|
function! MyCtrlW()
|
||||||
return 'Z'
|
let char = nr2char(getchar())
|
||||||
else
|
|
||||||
return ''
|
if get(t:, 'zoomed', 0) == 1
|
||||||
|
if char is# 'v' || char is# 's' || char is# '' || char is# ''
|
||||||
|
return ""
|
||||||
endif
|
endif
|
||||||
|
end
|
||||||
|
return "\<C-w>".char
|
||||||
endfunction
|
endfunction
|
||||||
|
nnoremap <expr> <C-w> MyCtrlW()
|
||||||
|
|
Loading…
Reference in a new issue