vim using line back in register

时间:2016-04-21 22:00:11

标签: vim vi

I would like to register this:

a

b

So I typed : then let @c='a^Mb' and I tried also with \r and \n instead of ^M

When I type "cp vim do not consider this as a return to line but as chars.

Update:

I am running vim 7.4.52 on 3.16.0-38-generic #52~14.04.1-Ubuntu

1 个答案:

答案 0 :(得分:2)

:let @c="a\n\nb"

Seems to be working fine for me on vim7.4 on FreeBSD. (Double quotes instead of single quotes)

If it's not working, you might want to specify which platform and version of vim?