GVim control characters on Windows

control-charactersgvimvim

I copied some data from an app and it has lots of ^Ds and ^Ms in it. I got rid of ^D with no problem using :%s/^D//g and I know I can remove ^M with something like :%s/^V^M//g but the problem is that I'm running on windows and ^V is Ctrl-V, which pastes data from the clipboard into gvim. How do I escape the paste function of ^V/ctrl-V in Windows for vim?

Best Answer

from :help CTRL-V-alternative:

                                                *CTRL-V-alternative* *CTRL-Q*
Since CTRL-V is used to paste, you can't use it to start a blockwise Visual
selection.  You can use CTRL-Q instead.  You can also use CTRL-Q in Insert
mode and Command-line mode to get the old meaning of CTRL-V.  But CTRL-Q
doesn't work for terminals when it's used for control flow.
Related Question