Re: OT: vim question

On 02/15/2011 10:30 PM, Taylor, Chris David wrote:

[...]

I want this:

:1,$s/[0-9]/^M/ --- but this replaces whatever matches in 0-9 with a carriage return -- I actually want it to not replace but insert a carriage return after finding the number string and keep the number.


Untested:

:%s/\([0-9]\)/\1^M/


Regards
Dimitre

Other related posts: