mogular / powerquery-formatter-examples

9 stars 1 forks source link

Tabs instead of spaces option? #5

Closed itsnotaboutthecell closed 4 years ago

itsnotaboutthecell commented 4 years ago

Description 4 spaces vs. a tab the eternal life long debate.

Settings Any way to have the options choose between outputting with spaces vs. tabs? (I love the tab).

UliPlabst commented 4 years ago

The formatter actually already supports this, it's just not exposed in the UI right now. I'm going to give you the option to choose once I have some time (most likely Tuesday).

TiagoRente commented 4 years ago

Never tabs! I like to use only 2 spaces, makes the identation smaller and I do like the identation. Although, people do not like my identation, at least in the beginning... I once work with an off-shore company, people kept using tabs. So I defined one tab to be 20 or 40 spaces (do not recall the correct value). With that configuration most of the code would be "off screen". So I send a message back saying I did not get the code. They finally got it not to use tabs.

itsnotaboutthecell commented 4 years ago

You kids and your anit-tabs movement - get off my lawn :P lol - listen as long as it's a toggle setting we can all live in harmony.

UliPlabst commented 4 years ago

Ok so I just deployed a new version where you can toggle between tabs and spaces in the options pane. Please note that HTML does not have a real tabular representation, so when you click Copy HTML it will still be indented with the HTML character. But when you click Copy code and you have Tab indentation configured \t will be used for indentation. You can also configure the tab width. The tab width does only affect how your tabs are rendered in the code block.
Please let me know if this is sufficient or if any issues arise.