Some editors, (not all!) differentiate between tabs (i.e. tab stops), which simply bumps the cursor to the next tab column and indents/offsets for program statements. For example in Emacs, you can set up tab-width: 8 and c-basic-offset: 3 which means that a tab bumps you to the next column on multiple of 8's (tab stop) but the indent for a if () { ... statement in C would be 3 spaces, not another tab:
if (foo > bar) {
printf("foo wins\n");
} else {
if (baz > bar) {
printf("baz wins\n"); // comment is tabbed
}
}
Note that the 1st column starts with a tab character, but the indents are 3 spaces. The // comment is tabbed over.
The editors that support this distinction between a tab stop and an indent that I know of are Visual Studio (not VSCode), Emacs, vi/vim, BBEdit. The editors "smart indenting" usually knows the difference between an statement offset indent and an actual tab (although sometimes in Emacs it's necessary to use C-q TAB to get a tab when it wants to indent).
The use-case here is a somewhat large, but "mature" code-base that uses tabs and offsets differently.
If applicable, add mockups / screenshots to help present your vision of the feature
Check for existing issues
Describe the feature
Some editors, (not all!) differentiate between tabs (i.e. tab stops), which simply bumps the cursor to the next tab column and indents/offsets for program statements. For example in Emacs, you can set up
tab-width: 8
andc-basic-offset: 3
which means that a tab bumps you to the next column on multiple of 8's (tab stop) but the indent for aif () { ...
statement in C would be 3 spaces, not another tab:Note that the 1st column starts with a tab character, but the indents are 3 spaces. The
//
comment is tabbed over.The editors that support this distinction between a tab stop and an indent that I know of are Visual Studio (not VSCode), Emacs, vi/vim, BBEdit. The editors "smart indenting" usually knows the difference between an statement offset indent and an actual tab (although sometimes in Emacs it's necessary to use C-q TAB to get a tab when it wants to indent).
The use-case here is a somewhat large, but "mature" code-base that uses tabs and offsets differently.
If applicable, add mockups / screenshots to help present your vision of the feature
No response