question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change `useTabs` to `true` by default

See original GitHub issue

Since we’re changing the defaults for several options in 2.0, I’ve decided to request that we do so for useTabs as well.

Tabs have several advantages over spaces:


See also: #6888

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:550
  • Comments:344 (69 by maintainers)

github_iconTop GitHub Comments

287reactions
MarcoZehecommented, Aug 4, 2020

The main reason I would like to see this change is for refreshable braille displays that are used by blind programmers a lot. Each space wastes one braille cell and takes away valuable braille realestate. So if the default indentation of a project is 4 spaces per level, a 3rd level indentation wastes 12 braaille cells before code starts. On a 40 cell display, which is the most commonly used with notebooks, this is more than a quarter of the available cells wasted with no information. If each indentation level was represented by only one tab character, there would be three cells occupied by a tab character each, and on the 4th cell, the code would start. That’s less than 10 percent occupied on the same length display, but all cells contain valuable information that is easily discoverable and immediately comprehensible.

143reactions
kachkaevcommented, Feb 22, 2021

Hey folks! It’s been about six months since the last comment and we have not seen arguments against switching to tabs in Prettier 3.0 by default (regardless of when it gets released). Can we say that there is a consensus about the change, which is justified by the accessibility benefits?

I think that some of the current downvotes can be attributed to making the change in Prettier 2.0 instead of 3.0. When I opened the issue today, I noticed my own 👎 and switched it over to 👍. Please do this too if you are in the same situation 🙂

I’m keen to use tabs in my own repos (especially the new ones), but feel a bit hesitant to swim against the tide (i.e. the community defaults). If Prettier embraces this accessibility improvement, tabs can become a norm quite soon!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I customize the tab-to-space conversion factor?
By default, Visual Studio Code will try to guess your indentation options depending ... useTabs": true // This made it finally work for...
Read more >
Options - Prettier
If you change any options, it's recommended to do it via a configuration file. ... editing real codebases, which justifies the default value...
Read more >
Use tabs in Chrome - Computer - Google Support
To change the order of your tabs, drag a tab along the top of the browser window. Pin a tab: Right-click the tab...
Read more >
Sublime Text 3 uses tabs instead of spaces for indentation
Also, anytime I modify the file Preferences.sublime-settings indirectly, ... So if your file is saved to use tabs (for example by another ...
Read more >
VisualStudio: Automatically turn tabs into spaces - Super User
If you'd like to use another default, you can modify the editor.insertSpaces and editor.tabSize settings. "editor.insertSpaces": true, "editor.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found