Skip to main content
The question does not contain anything related to python, also nothing linux specific; and fixed up spag
Source Link
Peter Brittain
  • 13.7k
  • 3
  • 45
  • 59

vim regular replace,how How to replace the old stra string with old str+appended strstring+appended string in vim

thisThis is the text in my file, which I'm editing with vim:

enter image description here

I want to change it to the the following content as next using regular,:

enter image description here

I have trytried using this regular expression :%s/^.*$/\g<0>,\g<0>/g,it's no but it's not working..

vim regular replace,how to replace the old str with old str+appended str

this is the text in my vim

enter image description here

I want to change it to the content as next using regular,

enter image description here

I have try :%s/^.*$/\g<0>,\g<0>/g,it's no working..

How to replace a string with old string+appended string in vim

This is the text in my file, which I'm editing with vim:

enter image description here

I want to change it to the the following content:

enter image description here

I have tried using this regular expression :%s/^.*$/\g<0>,\g<0>/g, but it's not working..

The question does not contain anything related to python, also nothing linux specific
Link
Source Link
elsonwx
  • 1.6k
  • 5
  • 17
  • 27

vim regular replace,how to replace the old str with old str+appended str

this is the text in my vim

enter image description here

I want to change it to the content as next using regular,

enter image description here

I have try :%s/^.*$/\g<0>,\g<0>/g,it's no working..