>> I use * regularly to search for words and the results are nicely >> highlighted. Many times I need to copy these terms after the : prompt >> (what is its name? command prompt? status bar?) for example when I need to >> grep for it in other files or search-and-replace it, etc. >> >> Is this possible? > > Hi Daniel, > > Are you aware that if you leave the search field "blank", i.e. > > :s//replacement/ > > then Vim just uses the most recent search text?
No, I was not aware of that! This is brilliant, the only reason I'm not surprised is that I got used to the fact that whatever I ask on this list I always get the exact thing in a response along the line "vim already makes this very simple, here is how" :) > This means that if you use > the * command to search for a word, and then execute the command above, the > word will be replaced with "replacement" without you needing to type it in. > Similarly, you could do > > :g// > > to find all occurrences of the most recent search term in the file. This is uber-cool too! Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- 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
