问题描述
:%s/souce/source/c
如何使其不断验证替换
问题解答
回答1::%s/souce/source/gc
回答2:把以下代码复制到你的 .vimrc 文件
' 不确认、非整词nnoremap <Leader>R :call Replace(0, 0, input(’Replace ’.expand(’<cword>’).’ with: ’))<CR>' 不确认、整词nnoremap <Leader>rw :call Replace(0, 1, input(’Replace ’.expand(’<cword>’).’ with: ’))<CR>' 确认、非整词nnoremap <Leader>rc :call Replace(1, 0, input(’Replace ’.expand(’<cword>’).’ with: ’))<CR>' 确认、整词nnoremap <Leader>rcw :call Replace(1, 1, input(’Replace ’.expand(’<cword>’).’ with: ’))<CR>nnoremap <Leader>rwc :call Replace(1, 1, input(’Replace ’.expand(’<cword>’).’ with: ’))<CR>
来源:https://github.com/yangyangwi...