Hello there,
As I mentioned in the title, i dont know why but the indentation with 3 spaces is broken in PHP files with “DocComment” in Windows. 2 or 4 spaces are work well but 3 or 5 spaces are not.
If i write any code in php with phpdoc and 3 spaces it works good without saving it. But when I save the file, close the file and open that file again, indentation cannot be detected almost every time (10-9, 10-8). But sometimes (10-1) it works. I really dont understand what the problem. I really love sublime text, i dont want to download vscode or atom. Sublimetext is the best editor for me but also i am obsessed with 3spaces. I cannot give up neither Sublime Text nor 3 spaces-coding.
I tried to disable detect_indentation setting but this one is not what i wanted.
And last, I haven’t installed any plug-ins yet.
Here is my settings:
My Sublime Text Version: Build 3207
My OS: Windows 10
{
"tab_size": 3,
"translate_tabs_to_spaces": true,
"detect_indentation": true,
"use_tab_stops": true,
"smart_indent": true,
"auto_indent": true,
}
Sample Code
class Test extends TestAbstract implements TestInterface {
/**
* Lorem ipsum dolor sit amet
* Lorem ipsum dolor sit amet
*
* @param string $test
* @param array $testArray
*/
public function __construct (string $test, array $testArray) {
if ($test == $testArray) {
return false;
} else {
return true;
}
}
}
Last, I’m bad at speaking-writing English. So, sorry about grammar.