Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to move multiple lines code together left or rights in Eclipse?

Tags:

eclipse

I want to select multiple lines and move them together (left/right/up/down). How to do that?

like image 422
Koenigsegg Avatar asked Sep 01 '14 11:09

Koenigsegg


People also ask

How do you move multiple lines to the right in VS code?

Just an observation: use [space] to right, and [shift]+[space] to left/reverse.

How do you move a block of code in Eclipse?

select block, use Source->shift right.

How do I move a line in Eclipse?

Moving lines: You can move lines up and down by pressing ALT+UP or ALT+DOWN. No need to select, cut, or paste! Duplicating lines by pressing CTRL+ALT+UP. Note that this key combination might be hijacked by your operating system or window manager (e.g. the default configuration of recent Gnome installations).


1 Answers

Moving lines left or right, i.e. changing the level of indentation, can be done in almost all code editors using Tab and Shift+Tab.

Moving blocks of code up and down can be done in Eclipse using Alt+up and Alt+down.

See Preferences -> General -> Keys.

like image 194
tobias_k Avatar answered Sep 22 '22 19:09

tobias_k