Move whole line up/down shortcut in nano (analogue to intelliJ or Visual Studio)

LinuxBashEditorNano

Linux Problem Overview


How to move a line of text up/down in Nano linux command line editor?

Is there any analogue way to do that as in IntelliJ Idea:

  1. Place the caret at the line to be moved.
  2. Do one of the following:

On the main menu, choose Code | Move Line Up or Code | Move Line Down.

Press Shift+Alt+Up or Shift+Alt+Down.

Linux Solutions


Solution 1 - Linux

You can use Ctrl+K to cut a line, move to destination position and press Ctrl+U to paste it.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionBlaiseView Question on Stackoverflow
Solution 1 - LinuxAlvaro Gutierrez PerezView Answer on Stackoverflow