VIM: how to append yanked text to unnamed register

前端 未结 2 752
夕颜
夕颜 2020-12-11 00:42

I know \"Ayy can append current line to register a.

How do I append current line to unnamed register?

2条回答
  •  星月不相逢
    2020-12-11 01:23

    You can use this

    :let @"=@".getline('.')
    

    to append to the unnamed register. I do not believe there is a keyboard shortcut to do this. (However you could create a mapping if you wanted.)


    The reason I say that there is no keyboard shortcut for this is because :h quote_alpha only talks about uppercase letters (for appending). And there is no equivalent statement in :h quote_quote

提交回复
热议问题