`tab_width` and `indent_size` shouldn't be mutual exclusive
See original GitHub issueHarfBuzz (a highly used font related Linux package) uses a mix of tabs and spaces, see this for example https://github.com/harfbuzz/harfbuzz/pull/292
- I have a question that is specific to this extension; thus, inappropriate for the main EditorConfig issue tracker.
- I tried running
code --disable-extensions
and the issue did NOT present itself.
Issue
Visual Studio Code | editorconfig-vscode | |
---|---|---|
Version | 1.20.1 |
0.12.1 |
Root .editorconfig
File
root = true
[*.{c,cc,h,hh}]
indent_style = space
tab_width = 8
indent_size = 2
Are there any other relevant .editorconfig
files in your project? No
File opened
Open https://github.com/harfbuzz/harfbuzz/blob/master/src/hb-aat-layout-morx-table.hh with vscode
Expected behavior
What is expected is somewhere between having or not having of indent_size, for example on this file it should be looked like and will happen if I remove indent_size = 2
from .editorconfig:
however the issue is if I comment that line out and try to write something on a function block it will become like:
Actual behavior
But without commenting indent_size = 2
that it will look like:
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:11 (3 by maintainers)
Top Results From Across the Web
bug: tabSize affects indentation #10339 - microsoft/vscode
For me, the use case is dealing with an old code base filled with a mix of tabs characters and space characters (but...
Read more >How can I customize the tab-to-space conversion factor?
The number of spaces a tab is equal to. This setting is overridden // based on the file contents when `editor.detectIndentation` is true....
Read more >Tabs and Indents | IntelliJ IDEA Documentation - JetBrains
Set the size of an indent (in a number of SPACE characters). Indent is a position of a text relative to the margin....
Read more >Word Processing - Paragraph Indentation
Specifies indentation to be removed from the first line. This attribute and firstLine are mutually exclusive. This attribute controls when both are specified....
Read more >Introduction — pycodestyle 2.10.0 documentation
This utility does not enforce every single rule of PEP 8. ... checks (unchecked if not set) --indent-size=n set how many spaces make...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The technical limitation in VS Code has been fixed by https://github.com/Microsoft/vscode/pull/62079, which will hopefully be in the 1.32 release.
So, this issue can be re-opened. The editorconfig extension will need to be modified to use the new
editor.indentSize
setting.By file I meant this issue, that you’ve closed it correctly, not the .editorconfig, which does some other good things 😃 (and I am switching between the two modes,
indent_size = 2
for editing,#indent_size = 2
for viewing, so it has some use to me at least 😛)