What's the shortcut to move a line up in Netbeans

17

5

I'm looking for a keyboard shortcut to move a line up or down.

Equivalent to Eclipe's Alt+up/Alt+down.

http://wiki.eclipse.org/FAQ_What_editor_keyboard_shortcuts_are_available%3F

I can't seem to find a similar one in NetBeans.

http://ui.netbeans.org/docs/hi/shortcuts/shortcut.html

Is this feature hidden somewhere?

denormalizer

Posted 2013-03-20T23:26:42.560

Reputation: 501

Answers

20

It's:

Alt + Shift + up/down

So quite similar to eclipse

denormalizer

Posted 2013-03-20T23:26:42.560

Reputation: 501

5

For those who use Linux, Alt + Shift + up/down could be a shortcut for changing windows, so instead Alt+Shift+Page Up or Page Down

giannis christofakis

Posted 2013-03-20T23:26:42.560

Reputation: 185

3

On Mac with NetBeans 8.2 the shortcuts are a little different:

Alt + Shift + up/down  -it duplicates the line
Ctrl + Shift + up/down  -it moves the line

duderoot

Posted 2013-03-20T23:26:42.560

Reputation: 131

1

Just click on the "Source" menu, in the menu bar, and look for the items "Move Up" and "Move Down" or "Move Code Element Up" and "Move Code Element Down". They should show the shortcut/accelerator for your platform.

JoseAriel

Posted 2013-03-20T23:26:42.560

Reputation: 11