PHPStorm deletes line if Backspace is pressed on the default indentation level
Asked Answered
A

1

7

After upgrading from 7.x to 8.x I noticed an annoying new "feature". When on an empty line (after pressing enter), then pressing backspace (which used to get rid of the indentation character right in front of the caret) the line is erased and the caret jumps back to the end of the line above.

Given the following code snippet and caret placement:

pressing Backspace does this:

How do I turn this off?

Attlee answered 1/2, 2015 at 9:59 Comment(0)
A
7

As of PhpStorm 9+, this setting is located in it's own section under Editor > General > Smart Keys > Backspace. Setting the Unindent drop-down to Disabled will give you the behaviour you would expect.

Editor > General > Smart Keys > Backspace > Unindent


The solution is to disable "Backspace smart indent" by going to File > Settings (or pressing CtrlAltS) then

  1. navigating to IDE Settings > Editor > Smart Keys
  2. searching for Backspace smart indent

and removing the tick from check box next to said option.

IDE Settings > Editor > Smart Keys > Backspace smart indent

Attlee answered 1/2, 2015 at 10:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.