vimrc: Add Togglemaxmin and replace word under cursor

Change-Id: I87aa251dbbbe4f1f54674f0cc4fccd8fc4d54e09
This commit is contained in:
Jakub Fojt
2019-08-08 16:15:16 +02:00
parent 6121505a46
commit 9bb8df11c8

19
.vimrc
View File

@@ -121,6 +121,25 @@ command! Csc cscope find c <cword>
" Key binds
"
" Simulate maximize/minimize window
nnoremap <C-w>m :call ToggleMiniMaxiWin()<CR>
nnoremap <leader>wm :call ToggleMiniMaxiWin()<CR>
function! ToggleMiniMaxiWin()
if tabpagewinnr(tabpagenr(), '$') > 1
tab split
elseif tabpagenr('$') > 1
if tabpagenr() < tabpagenr('$')
tabclose
tabprevious
else
tabclose
endif
endif
endfunction
" Replace the word under cursor
nnoremap <leader>* :%s/\<<c-r><c-w>\>//g<left><left>
nmap <F2> :NERDTreeToggle<CR>
nmap <F3> :NERDTreeFind<CR>
map <F5> :call CurtineIncSw()<CR>