开发者

vim replace character to \n

开发者 https://www.devze.com 2023-01-20 07:57 出处:网络
I need replace all ; 开发者_如何转开发to \\n , but :%s/;/\\n/gc not worksSee http://vim.wikia.com/wiki/Search_and_replace

I need replace all ; 开发者_如何转开发to \n , but :%s/;/\n/gc not works


See http://vim.wikia.com/wiki/Search_and_replace

When searching: \n is newline, \r is CR (carriage return = Ctrl-M = ^M)
When replacing: \r is newline, \n is a null byte (0x00).


You need to use \r as the replacement instead: :%s/;/\r/gc

0

精彩评论

暂无评论...
验证码 换一张
取 消