Link to home
Start Free TrialLog in
Avatar of kbdaemon
kbdaemonFlag for United States of America

asked on

VIM question - script to remove 1st two characters from each new line

I am using VIM 7.1 on WXP to make some alterations to a file that is almost 3MB in size.  I did remove all asterisks from the file using a global search and replace (%s/*/ /g), but now I need to remove the first two characters from each new line in the file (beginning at a certain point, because I tried to do a couple hundred lines manually).  Sometimes the first two are blank spaces, sometimes they are some very funky characters.  New lines are showing up as ^M in my file.

Is there a simple script I can write and run to accomplish this?
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial