• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3915
  • Last Modified:

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?
1 Solution
will replace starting from the current line

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now