문제

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