Search code examples
webstorm

Is Ctrl+Shift+Arrow gone from WebStorm?


I adore the feature in WebStorm that moves the current block (not line, not selection) up and down by block (not by line). On Windows it is/was Ctrl+Shift+Up/Down. For example you could change the order of sequential functions with a single command without selection.

Before:

function first() {
   ...
}

function second() {  // WITH CURSOR HERE, HIT CTRL+SHIFT+UP
   ...
}

function third() {  
   ...
}

After:

function second() {   // TA-DA!!
   ...
}

function first() {
   ...
}

function third() {  
   ...
}

It doesn't appear to work anymore after the most recent WS update to 2020.3.

(Neither does Ctrl+. as basically equivalent to alt+enter)

If I knew what the command was called I could reassign it but I never got to it from anywhere besides the key command which I discovered accidentally.

Anyone know?


Solution

  • It's possible that in your keymap it has completely different shortcuts.

    The actual action can be invoked using mouse from main menu: Code | Move Statement Up (and the opposite Code | Move Statement Down).

    You can check what shortcut is has in your keymap and change it as needed at Settings/Preferences | Keymap (use local search field to narrow down the list).

    enter image description here

    enter image description here