Does anyone know the shortcut for shifting a block of code in IntelliJ over by a few indents?
(For the CSS editor, Coda, I used to select the block or blocks of code and use the shift and left or right carrot symbols to shift the code right or left.)
To move (swap) a code element to the left or to the right, place the caret at it, or select it and press Ctrl+Alt+Shift+Left for left or Ctrl+Alt+Shift+Right for right.
Reformat line indents You can reformat line indents based on the specified settings. While in the editor, select the necessary code fragment and press Ctrl+Alt+I . If you need to adjust indentation settings, in the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Editor | Code Style.
Source menu -> Click "Shift Left" or "Shift Right"
Moving Content Up or Down in Your Class With your caret on a line, you can press ⌥⇧↑ (macOS), or Alt+Shift+Up Arrow (Windows/Linux), to move a line up. Alternatively, you can move a line down with ⌥⇧↓ (macOS), or Alt+Shift+Down Arrow (Windows/Linux). The same shortcut can move a selection up or down.
These are common Indent and Unindent actions, default shortcuts: Tab and Shift+Tab.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With