Cannot change tabulation size
Hi There Is there a way to set the tab size to 4 spaces instead of 2 of the new generated files?
Cheers Alban
Please consider reopening this issue. I have configured VSCode to not detect current file settings so that I can go in and auto-format each generated file, but it would sure be nice to skip this step.
+1 seems good and option in angular-cli.json 👍
+1 Please implement this.
+1. Not familiar with anyone use 2 spaces for indenting...
+1 Our team also uses 4 spaces and it's slightly annoying needing to go in and update them.
Could there not at least be a CLI option to set the number of spaces to tab when generating files?
If this feature is not going to be implemented near soon, at least consider to change the default indent to 4 spaces. It's the default indentacion in WebStorm and most editors.
+1, we use 4 spaces wide tabs for indentation... 2 spaces feel strange...
+1 This feature would be great. Or atleast change it to 4 spaces as that is the most common indentation setting from what I can tell.
+1 I would like to have that feature
+1 for Tabs. 2 spaces just makes the code ugly.
+1 for indentation. Can't stand 2 spaces!!!!!
Is this not something the team cares to add, @filipesilva? Seems to be a good bit of interest, yet the issue remains closed.
Tabs vs spaces (and number of spaces) is one of those heavy, contentious issues in the JS community.
It's not a matter of functionality, but rather of style. On matters of style we usually defer to the style guide. The style guide has no recommendations on tabs vs spaces but almost all of the examples internally are in 2 spaces, so we default to 2 spaces.
There are other style issues where we take action, but those are usually motivated by consistency (to minimize confusion and to make it easier to reference docs) rather than any kind of preference.
There is a fair amount of interest, yes. But there is also a very trivial workaround - format your code however you like. The amount of effort to offer this customization isn't well understood, but spending time looking into it is effort as well.
So as far as functionality is concerned, resolving this issue has zero impact. It's just not important enough to take up resources that would be best spent elsewhere.
Sure it would be easier for users to just throw a flag into generators, but I find it hard to justify to myself the development time. Should I fix broken functionality, or should I cater to the eternal tab/spaces struggle? That's an easy decision for me to make. It's also an easy decision if I'm talking about important features instead of bugs. It's very, very low on the totem pole.
We're looking at a new blueprint system and it should be much easier to make these style decisions there. The best I can say is that I'll keep that in mind at the time. But it's just not worth it to try and retrofit the existing system to support this kind of customization.
So that is why this issue remains closed.
Cool. Thanks for the feedback and reasoning, anyway. Guess it's safe to Unsubscribe to this one.
PS - 4 Space Tabs 4 Life!
@justin you mean just 4 spaces as formating
On Mon, Feb 20, 2017 at 12:49 PM, Justin Schneider <[email protected]
wrote:
Cool. Thanks for the feedback and reasoning, anyway. Guess it's safe to Unsubscribe to this one.
PS - 4 Space Tabs 4 Life!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/angular/angular-cli/issues/1252#issuecomment-281071091, or mute the thread https://github.com/notifications/unsubscribe-auth/ABFAqE1Ifi3dZdCjAR9vNxiavuSaFpvPks5reYvigaJpZM4JB73x .
-- www.albanx.com www.realuploader.com
@albanx No, tab characters that are 4 spaces wide. I knew I'd mess up saying it. o_O
I think most of community is against that, because the tab characters has proven to be problematic in different platforms, meanwhile the space is the same everywhere and will almost never affect file formatting in different platforms.
On Mon, Feb 20, 2017 at 1:37 PM, Justin Schneider [email protected] wrote:
@albanx https://github.com/albanx No, tab characters that are 4 spaces wide. I knew I'd mess up saying it. o_O
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/angular/angular-cli/issues/1252#issuecomment-281081070, or mute the thread https://github.com/notifications/unsubscribe-auth/ABFAqBLBl1dlAjmeUhmkJxu_wi0NMtWUks5reZcKgaJpZM4JB73x .
-- www.albanx.com www.realuploader.com
Right, which is why the feature in this issue was requested in the first place. So that individual devs and teams don't have to conform to what the community prefers as a whole. I'm not saying my preference is "right", but it certainly isn't wrong.
Yes, in any case, that should depend from .editorconfig file, so the idea is that the CLI should format files pending on the .editorconfig file
On Mon, Feb 20, 2017 at 1:43 PM, Justin Schneider [email protected] wrote:
Right, which is why the feature in this issue was requested in the first place. So that individual devs and teams don't have to conform to what the community prefers as a whole. I'm not saying my preference is "right", but it certainly isn't wrong.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/angular/angular-cli/issues/1252#issuecomment-281082358, or mute the thread https://github.com/notifications/unsubscribe-auth/ABFAqIPUAxLHjZT9dv5n7cq7VuGy0rIiks5reZh0gaJpZM4JB73x .
-- www.albanx.com www.realuploader.com