Please describe your request better; some screenshots or video will be very handy.
I just do not understand what you mean by "purely based on tab indentation only".
Code folding can be done at appropriate constructs (e.g. {...}, multiline comment block, function/class declaration, control syntax words (if/else) and alike, start/end of the HTML tag etc.
If you need to fold any custom region -- it's possible as well to create them -- make selection and then use "Fold Selection" action.
There's an example of what i am trying to achieve. No matter what the code is and how it is written, folding in Sublime 3 relies (in this particular example) purely on tab indent - that's what i am looking for. Since I don't like how if then else elseif is being folded by PHPStorm, tab indent folding would be a great help. Thanks
In real life example, I would pretty much prefer to not have code folded into one line, but do it Sublime Text 3 folding style, like shown in the attached pic. Question is how can i achieve this kind of folding style in PHP Storm?
I see. Thanks for the screenshots -- they explain a lot.
There is no generic indentation based folding in PhpStorm. But you may use Fold Selection as suggested earlier.
All folding (except some stuff like Fold Selection and alike) is language specific -- corresponding plugin provides info what elements are foldable.
About if/elseif/else example. As far as I'm aware -- that's how it works -- I do not remember seeing it folding differently (plus, I'm rarely using code folding myself -- mainly in XML/HTML/JSON files).
Other than that -- I may suggest to file a Feature Request ticket to the Issue Tracker (for tab-indent based) or wait until somebody from JetBrains support team will answer here -- maybe they can provide links to existing tickets that they are ware of (the main project, where such generic folding (platform-wide feature) would belong to, has a lot of tickets where "folding" is mentioned -- I could not find any relevant with my quick search).
Oh shoot, it's so inconvenient to read those long lines + when they fold you constantly lose track of where you are in the whole script, since it is not folding below the current line, sometimes it folds upwards and you lose focus instantly!
Hi there,
Please describe your request better; some screenshots or video will be very handy.
I just do not understand what you mean by "purely based on tab indentation only".
Code folding can be done at appropriate constructs (e.g. {...}, multiline comment block, function/class declaration, control syntax words (if/else) and alike, start/end of the HTML tag etc.
If you need to fold any custom region -- it's possible as well to create them -- make selection and then use "Fold Selection" action.
https://www.jetbrains.com/help/phpstorm/folding-code-elements.html
There's an example of what i am trying to achieve. No matter what the code is and how it is written, folding in Sublime 3 relies (in this particular example) purely on tab indent - that's what i am looking for. Since I don't like how if then else elseif is being folded by PHPStorm, tab indent folding would be a great help. Thanks
In real life example, I would pretty much prefer to not have code folded into one line, but do it Sublime Text 3 folding style, like shown in the attached pic. Question is how can i achieve this kind of folding style in PHP Storm?
I see. Thanks for the screenshots -- they explain a lot.
There is no generic indentation based folding in PhpStorm. But you may use Fold Selection as suggested earlier.
All folding (except some stuff like Fold Selection and alike) is language specific -- corresponding plugin provides info what elements are foldable.
About if/elseif/else example. As far as I'm aware -- that's how it works -- I do not remember seeing it folding differently (plus, I'm rarely using code folding myself -- mainly in XML/HTML/JSON files).
https://youtrack.jetbrains.com/issue/WI-32823 I guess (looks the same to me)
Other than that -- I may suggest to file a Feature Request ticket to the Issue Tracker (for tab-indent based) or wait until somebody from JetBrains support team will answer here -- maybe they can provide links to existing tickets that they are ware of (the main project, where such generic folding (platform-wide feature) would belong to, has a lot of tickets where "folding" is mentioned -- I could not find any relevant with my quick search).
Oh shoot, it's so inconvenient to read those long lines + when they fold you constantly lose track of where you are in the whole script, since it is not folding below the current line, sometimes it folds upwards and you lose focus instantly!