質問

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?

役に立ちましたか?

解決

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)?

From MacbookPro

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

you can change it or see how it works.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top