dotfiles

Configuration dotfiles
git clone git://git.wimdupont.com/dotfiles.git
Log | Files | Refs | README | LICENSE

commit 5c3c89bbecf19f605cb3f3bc9e7926b5d8df7120
parent 49db5d506dec9c61d170e8ed482a792f0a98eedd
Author: Wim Dupont <wim@wimdupont.com>
Date:   Sat, 22 Jun 2024 22:26:12 +0200

added maps and split resizing

Diffstat:
Mvimrc | 33++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/vimrc b/vimrc @@ -26,7 +26,7 @@ set ic let t:is_transparent = 1 let t:is_book = 0 -let g:netrw_winsize=20 +let g:netrw_winsize = 20 function! Toggle_transparent() if t:is_transparent == 0 @@ -52,6 +52,21 @@ function! Toggle_bookmode() endif endfunction +function! Change_Res(op,val,isvert) + let c = v:count == 0 ? 1*a:val : v:count*a:val + let cmd = a:isvert ? ':vert res' : ':res' + exec cmd . a:op . c + echo a:op . c +endfunction + +function! Set_IDE() + :Lex + :bo term + :resize -10 + wincmd w + wincmd w +endfunction + function! Format() call feedkeys("gggqG") call Clear_whitespace() @@ -63,10 +78,26 @@ endfunction runtime! ftplugin/man.vim +tnoremap <leader>w <C-w><C-w> +tnoremap <leader>i <C-w><S-n> +tnoremap <leader>R <C-w><S-n>:so /etc/vimrc<CR>i +tnoremap <leader><up> <C-w><S-n>:<C-U>call Change_Res('+',5,0)<CR>i +tnoremap <leader><down> <C-w><S-n>:<C-U>call Change_Res('-',5,0)<CR>i +tnoremap <leader><right> <C-w><S-n>:<C-U>call Change_Res('+',5,1)<CR>i +tnoremap <leader><left> <C-w><S-n>:<C-U>call Change_Res('-',5,1)<CR>i + +nnoremap <leader><up> :<C-U>call Change_Res('+',5,0)<CR> +nnoremap <leader><down> :<C-U>call Change_Res('-',5,0)<CR> +nnoremap <leader><right> :<C-U>call Change_Res('+',5,1)<CR> +nnoremap <leader><left> :<C-U>call Change_Res('-',5,1)<CR> +nnoremap <leader>w <C-w><C-w> +nnoremap <leader>R :so /etc/vimrc<CR> nnoremap <leader>t : call Toggle_transparent()<CR> nnoremap <leader>b : call Toggle_bookmode()<CR> nnoremap <leader>f : call Format()<CR> nnoremap <leader>c : call Clear_whitespace()<CR> +nnoremap <leader>e : call Set_IDE()<CR> + vnoremap <leader>y "+y vnoremap <leader>p "+p vnoremap <leader>P "_dP