Vim: \n vs. \r

后端 未结 8 1205
小鲜肉
小鲜肉 2020-12-23 17:40

I haven\'t used vim in a Unix system in a while, but as I recall there was no \\r, it was always \\n.

I\'m using gVim under windows and when I search for new

8条回答
  •  甜味超标
    2020-12-23 18:06

    Under unix, inside vim, ^V + gives me a ^M which is the \r character.

    Also, you can't find \r inside vim unless you tell it to edit the file in binary mode, that is, not using the default automatic mode where it autodetects the line ending. (it should print [dos] in the status.)

提交回复
热议问题