简体   繁体   中英

Vim macro with ^M doesn't work

I wanted to save the following command to my _vimrc file with set (on gvim for windows), to easily add line breaks to access SQL when Access removes them:

:/SELECT/,/FROM/s/, /,^M/g

Entering this normally, it does as expected, but as a macro, it doesn't work and I end up with just /g leftover.

How can I change this to use it as a macro?

我认为你应该使用\\r而不是^M

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM