Windows 上的 gVim 控制字符

Fru*_*ner 7 vim gvim control-characters

我从一个应用程序中复制了一些数据,其中有很多^Ds 和^Ms。我摆脱了^D使用没有问题:%s/^D//g,我知道我可以删除^M类似的东西,:%s/^V^M//g但问题是我在 Windows 上运行并且^V是 Ctrl-V,它将剪贴板中的数据粘贴到 gvim 中。如何^V在 Windows 中为 vim转义/ctrl-V的粘贴功能?

isc*_*iad 8

来自: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.
Run Code Online (Sandbox Code Playgroud)


isc*_*iad 5

另一种特定于 ^M 的方法是使用,:%s/\r//g因为 ^M 是回车。