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

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

问题描述

命令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?

推荐答案

这完全取决于您粘贴的寄存器中的数据类型.如果数据是面向行的数据(例如用 yy 猛拉),它将作为整行粘贴在光标上方或下方.如果数据是面向字符的(例如用 y2w 猛拉),那么它将粘贴在当前光标位置或之前线.

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.

查看 :help linewise-register 获取更多关于 register 类型和 put 命令之间交互的信息.

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

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

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