bash 在 nano 中向上/向下移动整行快捷方式(类似于 intelliJ 或 Visual Studio)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33217564/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Move whole line up/down shortcut in nano (analogue to intelliJ or Visual Studio)
提问by Blaise
How to move a line of text up/down in Nano linux command line editor?
如何在Nano linux 命令行编辑器中上下移动一行文本?
Is there any analogue way to do that as in IntelliJ Idea:
是否有任何类似的方法可以像IntelliJ Idea那样做到这一点:
- Place the caret at the line to be moved.
- Do one of the following:
- 将插入符号放在要移动的行上。
- 执行以下操作之一:
On the main menu, choose Code | Move Line Up or Code | Move Line Down
.
在主菜单上,选择Code | Move Line Up or Code | Move Line Down
。
Press Shift+Alt+Upor Shift+Alt+Down.
按Shift+ Alt+Up或Shift+ Alt+ Down。
回答by Alvaro Gutierrez Perez
You can use Ctrl+Kto cut a line, move to destination position and press Ctrl+Uto paste it.
您可以使用Ctrl+K剪切一条线,移动到目标位置并按Ctrl+U粘贴它。