search/replace mapping

This commit is contained in:
ManjaroOne666 2019-02-22 22:07:25 +00:00
parent 34fcde1258
commit 2394b1963d
1 changed files with 4 additions and 2 deletions

6
vimrc
View File

@ -1130,7 +1130,9 @@ set concealcursor=
"----------------------------------------------------------------------------}}}
" #mappings {{{
let g:mapleader = ' '
" search and replace {{{
nnoremap <space>rr :%s/\<<C-r>=expand('<cword>')<CR>\>//g<left><left>
"}}}
" miscallaneous {{{
nnoremap 0 ^
nnoremap <silent><space>cs :let @/=""<cr>
@ -1148,7 +1150,7 @@ nnoremap <space>;j jA;
" Focus on current fold, close the rest
nnoremap <silent> <space>zz zMzvzt
" replace current word with last yanked/deleted text
nnoremap <silent> <space>rr "_diwP
nnoremap <silent> <space>rw "_diwP
" replace current word with last yanked text
nnoremap <silent> <space>ry diw"0P
" quick grep of visual selection