Advertisement
theitd

VI Search and Replace

Jan 22nd, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. If you need to do something like, search for all new lines and add the new line plus "foo" do the following:
  2.  
  3. :1,%s/\n/^Mfoo/g
  4.  
  5. You get the ^M character by pressing ctrl-v and then hitting enter.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement