I use PhpStorm/IntelliJ. It is configured to indent using spaces by default because I use PHP's PSR-2 standard a lot. I don't want to change the default indentation settings.
However I want to write makefiles and they require to use tabs for indentation.
How can I write makefiles in PhpStorm/IntelliJ with spaces as default indentation?
In the editor, press Ctrl+Tab . Keep pressing Ctrl for the Switcher window to stay open. Use Tab to switch between tabs and other files.
Select this checkbox to have IntelliJ IDEA display whitespaces or tabs (depending on the Code Style settings). You can select the following options: Leading: select this checkbox to add whitespaces before your code line. Inner: select this checkbox to display whitespaces inside the line of your code.
Open the Settings dialog by navigating to File -> Settings . Under Project Settings [yourproject] on the left side of the dialog, navigate to Code Style -> General . The Tab size is configurable on that pane, and the value you provide applies only to the project named yourproject .
1) By now, there is a Makefile plugin for PhpStorm.
If you use this plugin and create a Makefile
, it will automatically use tabs.
2) Another solution is to change the Makefile not to use tab as prefix. However, I do not like this solution very much because it requires a newer version of gmake which makes it less portable.
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