Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 565
SeinopSys Avatar asked Feb 01 '15 09:02

SeinopSys


1 Answers

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

like image 189
SeinopSys Avatar answered Oct 20 '22 04:10

SeinopSys