You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @Angelisium, does this mean the entire source code would be indented by the given amount of tabs? Personally, I've never seen code formatted that way. What's the benefit of doing this?
Sorry for the delay in responding, I did not see the notification.
Yes, it's to indent of +1 the whole document ; I don't think it has some benefit, personally I think it's just prettier.
I learned PHP a few years ago and it always seemed logical to me to indent the code between tag <?php ... ?> ; and it stayed even after I stopped using the ?> tag.
E.G. :
<?php// some stuff// foo bar?>
As it is the case when I add CSS or JS between HTML tags.
E.G. :
<!DOCTYPE html><htmllang="en"><!-- head --><body><style>
body {
/* some stuff */
}
</style></body></html>
I know it's rare. I myself only do it when I'm working on solo projects (or personal projects of which I am the leader 😈) ; otherwise, I follow the formatting rule established beforehand (generally PSR-2/12 for simplicity)
I don't have many public examples... I found that in my gitlab code snippets: Time and Sql ; and this in my gitlab repo : Octave
there is not much code but it gives an idea of what it looks like with a +1 indentation everywhere.
Hi 👋
I don't know if many people would be interested, I think it would be nice to have an option to define a minimal indentation. like :
Who, according to
--tab-width
and--use-tabs
would give :Input:
Output:
I know it's a really marginal addition but it makes me anxious not to have this indentation that I always use in all my projects 😭
The text was updated successfully, but these errors were encountered: