How to paste in the line where the cursor is?

后端 未结 10 1207
心在旅途
心在旅途 2020-12-04 11:26

The command p pastes below the cursor and P pastes above the cursor. What\'s the command to paste in the line where cursor is?

10条回答
  •  攒了一身酷
    2020-12-04 11:56

    This all depends on the type of data in the register you're pasting. If the data is line-oriented data (yanked with yy for instance) it will be pasted as a whole line above or below the cursor. If the data is character-oriented (yanked with e.g. y2w) then it will be pasted at or before the cursor position in the current line.

    See :help linewise-register for more info on the interaction between the type of register and the put command.

提交回复
热议问题