Webstorm: Move Line Up or Down

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


On mac

For line up cmd+Shift+up

For line down cmd+Shift+down


Please can you provide a code snippet and exact steps to recreate the issue? Are you sure that you are using Code/Move Line (up/down) and not Code/Move Statement(up/down)?

Tags:

Webstorm