如何在光标所在的行中粘贴? [英] How to paste in the line where the cursor is?

查看:99
本文介绍了如何在光标所在的行中粘贴?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

命令 p 粘贴在光标下方,而 P 粘贴在光标上方.在光标所在的行中粘贴的命令是什么?

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?

推荐答案

这全部取决于您要粘贴的寄存器中的数据类型.如果数据是面向行的数据(例如,用 y y 选中),则将其粘贴为光标上方或下方的整行.如果数据是面向字符的(例如用 y 2 w 选中),则将其粘贴在当前光标位置或之前线.

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.

有关寄存器类型和put命令之间的交互作用的更多信息,请参见:help linewise-register.

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

这篇关于如何在光标所在的行中粘贴?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆