Originally Posted by reiki33
Another useful technique of delimiting characters comes when you get a windows file and want to remove all of the ^M (ctrl-M) at the end of a line. You need to enter the ^M literally and not have it get taken as an end-of-line input. You can use the :%s/^v^M//g command. The ctrl-v tells vi to take the next character literally, so you can input it into the command. The s command invokes sed and will change all of the occurrences (the g part) of ^M on all (the % part) of the lines.
Okay. I know this is a Linux forum. But the thread is about vi, which I also use on Windows and which has a peculiar quirk that took me a long time to figure out. With vim on windows, the ^v is used for something else. Instead, ^q is used as the escape character.