Webstorm: moving a line up or down

Using Webstorm8, I couldn’t understand when you use the line to move up or down, it will not place the line inside the function, but skip the function, or by placing a moving line at the top or bottom of the function based on the direction the line moves. Any ideas on how to move a line up or down a line number, how does this happen in Sublime?

+9
webstorm
source share
4 answers

Just to clarify if anyone else works on this ... The shortened alt up / down key is set by default to 'move statement'.

go File> Preferences ... Enter Keymap in lefthand search to find the left navigation option "keymap"

then in your right hand find the "line of movement" and scroll down to switch it, as shown in the figure below ...

change-move-line-shortcut

+19
source share

On mac

For lines cmd + Shift + up

For row down cmd + Shift + down

+9
source share

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

+2
source share

From MacbookPro

(sitting-> Keymap-> MainMenu-> code (Move Line Down & up))

You can change it or see how it works.

0
source share

All Articles