Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webstorm: Move Line Up or Down

Tags:

webstorm

Using Webstorm8, I have been unable to figure out when using move line up or down, it will not place the line inside of a function, rather it skips the function either placing the movable line at the top or bottom of the function based on direction of line movement. Any ideas how to move a line up or down a line number as happens in Sublime?

like image 409
SuperNinja Avatar asked Apr 20 '14 17:04

SuperNinja


People also ask

How do you move a line up in Webstorm?

Move a line up or down Choose Code | Move Line Up/Down from the main menu. Press Alt+Shift+Up or Alt+Shift+Down .

How do you move a line up and down?

Press the shortcut keys to move the line under the cursor up or down or select a block of text and press the shortcut keys to move the entire block up or down. The default shortcut keys are as follows: Alt + ↑ (Up Arrow) – Moves a line up. Alt + ↓ (Down Arrow) – Moves a line down.

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 you move Line riders?

You can move the line where the caret resides up and down using dedicated shortcuts: Ctrl+Alt+Shift+Up and Ctrl+Alt+Shift+Down .


2 Answers

On mac

For line up cmd+Shift+up

For line down cmd+Shift+down

like image 175
Mo. Avatar answered Nov 04 '22 12:11

Mo.


Just to clarify if anyone else runs into this... The shortcut of alt up/down is set to 'move statement' by default.

goto File > Settings... Type Keymap in the lefthand search to find the left nav option of 'keymap'

then in the right hand search search 'move line' and scroll down to switch it as shown in the picture below...

change-move-line-shortcut

like image 44
ThinkBonobo Avatar answered Nov 04 '22 12:11

ThinkBonobo