Skip to content

Instantly share code, notes, and snippets.

@deris
Created May 28, 2012
Embed
What would you like to do?
検索文字列をレジスタでグローバル置換
" 検索文字列をレジスタでグローバル置換
function! s:ReplaceGlobalSearchToRegister()
let l:reg = getreg(v:register)
let l:cmd = '%substitute//'
let l:opt = '/g'
execute l:cmd . l:reg . l:opt
endfunction
nnoremap <silent> <Space>rs :<C-u>call <SID>ReplaceGlobalSearchToRegister()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment