1

Using gvim on a file with 30K lines, I want to use ex mode to delete from column 130 to end of line, making each record no longer than 130 characters. I want to do this for the entire file.

My macro to do this is 131|D. How can I do this from the colon prompt?

3

You can use \%c to match a column in a substitution:

:%s/\%131c.*//

For more help see:

:h /\%c

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.