Allow users to configure the tab size #5403

Closed
opened 2026-01-31 00:12:33 +00:00 by claunia · 5 comments
Owner

Originally created by @mikemaccana on GitHub (Dec 5, 2019).

Description of the new feature/enhancement

Tab is often used inside files. It can traditionally be 8 characters, but eg Python commonly uses 4 and JS uses 2. it would be useful to allow the user to configure the tab size. or maybe this would be better handled in higher level tools? Just a thought.

image

Originally created by @mikemaccana on GitHub (Dec 5, 2019). # Description of the new feature/enhancement Tab is often used inside files. It can traditionally be 8 characters, but eg Python commonly uses 4 and JS uses 2. it would be useful to allow the user to configure the tab size. or maybe this would be better handled in higher level tools? Just a thought. ![image](https://user-images.githubusercontent.com/172594/70250317-9d8b8380-1775-11ea-9741-7f884bb5ed17.png)
claunia added the Issue-FeatureNeeds-Tag-Fix labels 2026-01-31 00:12:33 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Dec 5, 2019):

Nah, terminal tabs are always either 8 or whatever the client application set by using the “set horizontal tab stops” escape sequences. That sequence is already well-supported in conhost (and therefore, in Terminal).

@DHowett-MSFT commented on GitHub (Dec 5, 2019): Nah, terminal tabs are always either 8 or whatever the client application set by using the “set horizontal tab stops” escape sequences. That sequence is already well-supported in conhost (and therefore, in Terminal).
Author
Owner

@zadjii-msft commented on GitHub (Dec 5, 2019):

There are commadline applications that are out there (@ emacs) which assume that tabs are 8 spaces, and others out there that change the width of a tab so that they can quickly navigate within the buffer. If we let people configure this default value, that would undoubtably break the rendering of these applications.

It'd probably be easier to get a --tabWidth 4 param added to cat

@zadjii-msft commented on GitHub (Dec 5, 2019): There are commadline applications that are out there (@ emacs) which assume that tabs are 8 spaces, and others out there that change the width of a tab so that they can quickly navigate within the buffer. If we let people configure this default value, that would _undoubtably_ break the rendering of these applications. It'd probably be easier to get a `--tabWidth 4` param added to `cat`
Author
Owner

@mikemaccana commented on GitHub (Dec 5, 2019):

Yeah fair enough @zadjii-msft I suspected as much. 👍🏼

@mikemaccana commented on GitHub (Dec 5, 2019): Yeah fair enough @zadjii-msft I suspected as much. 👍🏼
Author
Owner

@cygnus2048 commented on GitHub (Jun 27, 2023):

So how do I configure the terminal to use 4-spaces for tabs?

@cygnus2048 commented on GitHub (Jun 27, 2023): So how do I configure the terminal to use 4-spaces for tabs?
Author
Owner

@lhecker commented on GitHub (Jun 27, 2023):

As explained above, tabs aren't really configurable in terminals in general. Unless I'm mistaken, other popular terminals do not allow this to be configured either. Your application or editor likely has a setting to change the width of tabs already. vim for instance uses the tabstop and shiftwidth settings for this. The popular pager less also has an option via -x4.

@lhecker commented on GitHub (Jun 27, 2023): As explained above, tabs aren't really configurable in terminals in general. Unless I'm mistaken, other popular terminals do not allow this to be configured either. Your application or editor likely has a setting to change the width of tabs already. `vim` for instance uses the `tabstop` and `shiftwidth` settings for this. The popular pager `less` also has an option via `-x4`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5403