如何在当前行之后加入上面的行? [英] How do I Join the line above after current line?
本文介绍了如何在当前行之后加入上面的行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道Vim中的这些命令:
I know these commands in Vim:
J:在当前行之后加入下面的行
-J:在上一行之后逐行加入当前行
J : Join line below after current line
-J : Join current line after line above
但是如何在当前行之后加入上面的行?
but how do I join the line above after current line?
推荐答案
有很多方法可以做到这一点.一种可能是…删除上面的行,并将其附加到下面的行的末尾:
There are many ways to do it. One would be… deleting the line above and appending it to the end of the line below:
k move up one line
^ move to the first printable character
y$ yank to the end of the line
"_d get rid of the now useless line by deleting it into the black hole register
$ move to the end of the line
p put the deleted text
这篇关于如何在当前行之后加入上面的行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文