Tuesday, January 25, 2011

Re: How to replace "\" to "\\"

 
 
 
 
  I have a text containing both "\" and '\\". Now I want to replace all the "\" to "\\", but leave those have already been "\\" alone. How can I achieve this?
 
 
:%s/\\/\\\\/g

2011-01-26

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