Reputation: 585
I'm trying to use a vim script to clean up some subtitle files.
When I paste these commands into vim, they work fine. However the lines with ^M in them aren't working when being used by vim -s script.txt filename.srt.
This is the contents of script.txt (image, because ^M's break things):
Is what I'm trying to do possible? or should I attack it in a different way?
Upvotes: 0
Views: 97
Reputation: 585
The solution was to replace the ^M with \r. This works with vim -s.
Upvotes: 1