plnkr / feedback

Feedback on Plunker
19 stars 11 forks source link

Real tabs in code #568

Open Nickwiz opened 1 year ago

Nickwiz commented 1 year ago

Is your feature request related to a problem? Please describe.

I'm always frustrated when [...] editors expand tabs.

Tabs are used a lot to indent code. Tabs are simple but flexible when it comes to customization, also in browsers:

I am of the opinion that people should have the possibility to choose (and not be forced to use IMO :sweat_smile: bad indentation).

It is also extremely unfriendly to people with disabilities.

The excellent property of tabs is that one can set it's display width. The user-friendliness is off the charts :chart_with_upwards_trend: :+1:.

In a browser it is as simple as:

.tab-size-8 {
    tab-size: 8;
}
[data-tabsize="4"] {
    tab-size: 4;
}
.foo {
    tab-size: var(--tabsize);
}

etc.

The same goes for any decent stand-alone editor / program.

Most have the option to specify tab-width and option to expand tabs. I never use it, but sure some do, and that's OK: their choice.

Describe the solution you'd like

Describe alternatives you've considered

Hit the wall.

Additional context

Personally I always use 8-char wide tabs. Only place I do not is in CSS. To me two space indentation is the worst (beside 1) as it makes code very hard to read and much more tiresome over longer periods of time. It's also a source for bugs, miss-reading etc. The use of expanded tabs in form of spaces also makes navigation more cumbersome. If one copy code, even code one write oneself, into ones usual editor one have to re-indent to make it usable. When I press TAB on my keyboard I expect a tab, not 2 spaces. In short it is a needless source of frustration :smiling_face_with_tear: .

We :heart: tabs!

ggoodman commented 1 year ago

Sounds like a good addition!