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?

1 Answer 1


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


For more help see:

:h /\%c

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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