-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature: Add option for setting indentation #2566
Comments
Curious, what would this be used for? I am assuming you are talking about how the code is laid out; couldn't you modify that in your IDE? |
@fullstackdave yes, ofc I can, but I have to do this with every file file generated. I think I can automate it (I'm using Sublime Text 3), but I use it for other projects and I don't know how to do it without any problems with other files. |
Dupe of #1252 |
Well, that referenced issue didn't end too good. Quite frankly I do not understand why there is a really nice This really isn't an issue for professional programmers who know their tools but from time to time you can get that amazing opportunity to have an intern on your project who will touch the codebase and I think this option could be helpful for those guys and also you're gonna have one thing less on your list of things you have to watch that guy for. |
+1 I really don't understand, I have to re-edit everytime the scaffolded files |
@mpragliola the blueprint files are tab space 2. There isn't a setting to change tab space, you would need a whole new blueprint with tab space 4 or run some formatter on the newly generated file with your config settings. |
Yeah, that other thread aside... I'm with everyone else who would like this feature, and it seems like if you have the value set in .editorconfig it should be honored. Having to reformat everything the cli generates is not desirable. @prestonvanloon what about replacing the double-spaces with an arbitrary character and then using the .editorconfig to replace that character on the way out? |
I would also like the feature to generate components etc. with tabs instead of spaces. Thank you. |
👍 |
Agreed. I am loving the CLI but i spend half my time converting from tabs to spaces and then 2-4 width.. To have this configurable would be the polish on an otherwise super useful tool. |
Since it seems that this issue will not be fixed anytime soon and since it takes some time to manually format the files every time I create a component (and I create them very often), I've made an ugly, not recomended workaround for this: I edited the file Please note that this is a workaround and it's not recommended. And please, please, let's not argue what is "best" or "right" about using tabs, spaces or their sizes. Let's just accept that each professional likes the configuration that is best for their eyes 😃 |
I love tabs and hate spaces, plz halp! |
This should be available soon-ish via automatically running TS Lint fixers on generators. This is being tracked in #6272. |
@kleber-swf Genius |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I think I'm not the only one who prefers tabs to spaces. Also I know that many people use different space count on indentation.
I suggest adding defaults.indent option to angular-cli.json.
The text was updated successfully, but these errors were encountered: