Closed jimeh closed 10 years ago
No particular reason. What value works well for you? (with examples, please — the one you have in the issue are very indicative!).
Uhm, I think my question falls more under why is it not 0? And in what circumstance is that feature useful? I'm no Cucumber guru, nor do I interact with the community, so it could simply be that I'm highly uninformed and/or an idiot.
I simply don't understand what the use there is for adding 10 (or another number) extra spaces to the indentation.
It was introduced in c6551af53a98647181185aad78c5506c6de91634 by @mar-kolya. Perhaps he can provide some reasoning behind this decision.
Well, I do not think it was introduced by me originally.
If you look into that commit you may notice that all I did was to replace hardcoded '10' in the code with customizable variable. And IIRC I did it exactly for the reason that 10 seemed unreasonable to me and this gives me an ability to customize it in my setup.
Hope this helps :)
@mar-kolya thanks for the clarification. @jimeh do you want to submit a PR that changes 10 to a value that works better in your opinion?
@michaelklishin Sounds like a plan. I'll do a little bit of digging after work today to see if I figure out what the purpose actually is incase defaulting it to 0 is stupid. And if not I'll submit a PR :)
Thanks, and apologies for not getting around to it myself as I promised.
Using the following example from Cucumber's wiki:
With the default settings, and calling
indent-region
against the whole file, it ends up looking like this: