Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 464
Blaise Avatar asked Oct 19 '15 14:10

Blaise


People also ask

How do I move a line up or down in Intellij?

Moving Content Up or Down in Your Class With your caret on a line, you can press ⌥⇧↑ (macOS), or Alt+Shift+Up Arrow (Windows/Linux), to move a line up. Alternatively, you can move a line down with ⌥⇧↓ (macOS), or Alt+Shift+Down Arrow (Windows/Linux). The same shortcut can move a selection up or down.

How do I move text in Intellij?

Press ⌥⇧↑ (macOS), or Alt+Shift+Up Arrow (Windows/Linux), to move a line up. To move a line down use ⌥⇧↓ (macOS), or Alt+Shift+Down Arrow (Windows/Linux).

How do you move a line up and down in Pycharm?

Move a line up or downPress Alt+Shift+Up or Alt+Shift+Down .

How do I undo in nano editor?

You can use the following shortcut keys in nano to undo or redo: Alt + U is used to undo anything in the nano editor. Alt + E is used to redo anything in the nano editor.


1 Answers

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

like image 120
Alvaro Gutierrez Perez Avatar answered Oct 07 '22 06:10

Alvaro Gutierrez Perez