简体   繁体   中英

Auto indentation in PhpStorm like in WebStorm by default

Using WebStorm with the default configuration, when I press delete in a blank line with some spaces, the whole line is always deleted. Also, if I close a bracket for a function, the code inside is auto-indented.

I've tried to configure PhpStorm (7.1) with such functionalities ( Settings -> Code Style -> General and Settings -> Code Style -> PHP ). I thought that I had found it out when I saw Tabs and Indents -> Smart Tabs , but selecting those options nothing seems to change.

PhpStorm标签和缩进

How could I get the above behaviour in PhpStorm?

Edit:

As @lena has suggested, I looked inside Editor -> General -> Smart keys , but doesn't exist any Reformat block on typing '}' option and the other stuff is enabled:

在此输入图像描述

Please make sure you have Reformat block on typing '}' enabled in Settings | Editor | General | Smart keys Settings | Editor | General | Smart keys Settings | Editor | General | Smart keys . Also, please try playing with 'Backspace | Unindent 'Backspace | Unindent ' in Settings | Editor | General | Smart keys Settings | Editor | General | Smart keys Settings | Editor | General | Smart keys :

  • "Disabled' - smart backspace is turned off;
  • 'To nearest indent position' - deletes white spaces to nearest indent position, does not jump to the line above;
  • 'To proper indent position' - jumps to the line above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM