vim – 如何在当前行之后加入上面的行?

前端之家收集整理的这篇文章主要介绍了vim – 如何在当前行之后加入上面的行?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在Vim中知道这些命令:

J : Join line below after current line
-J : Join current line after line above

但是如何在当前行之后加入上面的行?

有很多方法可以做到这一点.一个是……删除上面的行并将其附加到下面一行的末尾:
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

猜你在找的Bash相关文章