Tuesday, 27 August 2019

how to replace the text in vim

# general 
:%s,foo/bar/baz,foo/bar/boz,g
 
# special characters
:%s,data\[0\],data,g 
  
:%s/\/Users\/tom\/documents\/pdfs\//<new text>/g

No comments:

Post a Comment