Kai Weber wrote: > 1. Go to Visual mode > 2. Select text > 3. y'ank > 4. :%s/<c-r>*/foo/g > > One problem with this workflow I have to check if my selected > text contains special characters I have to escape (e.g. /).
I use this tip: http://vim.wikia.com/wiki/Search_for_visually_selected_text That tip is pretty essential: you can select text, then press * to search for it. To do a substitute, I first search (i.e. select text and press *), then enter a command like: :%s//new text/g The empty pattern in the substitute means it uses the last search. John -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
