This should be straight forward but I can't readily find an answer:

If I have a search:

:%s/search_text.*more_text/replace_text/gc

How can I access the matched text (note above the regex in the
middle).

For example I would want to do something like (coming from TextMate I
could use the $0 value to access the match and use it in the replace):

:%s/search_text.*more_text/replace_text$0more_replace_text/gc

Where $0 would be the match and I would be appending to it.

-- 
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

Reply via email to