From 9bb8df11c8db9b12998feb84137506135bf7b05c Mon Sep 17 00:00:00 2001 From: Jakub Fojt Date: Thu, 8 Aug 2019 16:15:16 +0200 Subject: [PATCH] vimrc: Add Togglemaxmin and replace word under cursor Change-Id: I87aa251dbbbe4f1f54674f0cc4fccd8fc4d54e09 --- .vimrc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.vimrc b/.vimrc index 5eb69f1..830aa71 100755 --- a/.vimrc +++ b/.vimrc @@ -121,6 +121,25 @@ command! Csc cscope find c " Key binds " +" Simulate maximize/minimize window +nnoremap m :call ToggleMiniMaxiWin() +nnoremap wm :call ToggleMiniMaxiWin() +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 * :%s/\<\>//g + nmap :NERDTreeToggle nmap :NERDTreeFind map :call CurtineIncSw()