Inserted easy search-and-replace

Shift+R enters command mode and puts :%s/<cword>/ in the command line (TODO: Visual mode support)
This commit is contained in:
Talia 2017-10-31 09:12:02 +01:00
parent 1de53904d9
commit f627f0ca1a

1
vimrc
View file

@ -168,6 +168,7 @@ nnoremap <C-d> :copy .<CR>
nnoremap dx 0"_d$ nnoremap dx 0"_d$
nnoremap dcx 0d$ nnoremap dcx 0d$
nnoremap <leader>: :let @* = @:<CR> nnoremap <leader>: :let @* = @:<CR>
nnoremap <expr> <S-r> ":%s/".expand("<cword>")."/"
" Tabs vs. Spaces " Tabs vs. Spaces
nnoremap <C-tab> :setl expandtab!<CR>:set expandtab?<CR> nnoremap <C-tab> :setl expandtab!<CR>:set expandtab?<CR>