s/\(word\) => ,/\1 => \1,/On Wed, 2 Feb 2011, Colin Beighley wrote:
Hello,
I want to do something like this
word => ,
becomes
word => word,
with search and replace. Any suggestions?
--
Best,
Ben
--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
Thanks! What I wanted was to match any word before the =>, as well as preceding tabs, so I ended up using
:s/\(^\t*\)\t\(.*\) => ,/\1\t\2 => \2,/
Colin
-- 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
No comments:
Post a Comment