Substitute with contents of register or lines range from elsewhere in file in Vim

According to http://vim.wikia.com/wiki/Search_and_replace
It appears:

:%s/foo/\=@a/g

Also, pressing <c-r>a while in insert mode will insert the contents of register a.

Cool — I never knew that. Good question.

Some other things to do with <c-r>: http://vimdoc.sourceforge.net/htmldoc/cmdline.html#c_CTRL-R

Leave a Comment

casinojojobetpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casinocanlı bahis casino siteleriOnwin Güncel Girişcasinoholiganbet girişholiganbet güncel giriş