Comments (6)
@cblp, can you give me a short example of a file that would use both of these settings at the same time and why? I'm just having a hard time picturing a scenario in which this would be a good idea, but I'm all ears.
from editorconfig-vscode.
Here's an example of such Makefile.
build:
find -name '*.c' \
| xargs
grep
--only-matching
pattern
Unfortunately, GIthub replaces tab character with 4 spaces, so we have to pretend there is a tab.
from editorconfig-vscode.
[*]
indent_style = tab
tab_width = 4
is this what you want?
from editorconfig-vscode.
Are you asking for a file, using both indentation and tabs? Indentation is used in almost all programming languages, and tab character may be used in almost any text file. For example, I can indent my C code by 4 spaces and use tabulation in comments to align ASCII drawings.
Moreover, one can use tab even in indentation! Just look at any Makefile. Its syntax makes you indent bodies of recipes with tabulation. But using tabs to indent code inside recipes is too wastefully. So many people (at least, as I can see), use 2-4 spaces to indent inner blocks inside recipes.
Despite of all that, do you know, why somebody on Earth may want to change the tab size?
from editorconfig-vscode.
Unfortunately, I don't know where the tab is supposed to be!
I think I get what you're saying now though... kinda. I'm personally a fan of tabs for indentation, spaces for alignment, so you would never see tabs follow indentation in one of my files. Here's why...
As such, I would never actually declare the tab_width
setting in an .editorconfig
file, because I believe the user should be in control of what they deem an appropriate tab size. As long as the rules are followed according to my animated GIF above, people can feel free to use whatever they want.
That said, are you still convinced of a need for a file with "tabs for alignment following indentation"? I believe this is what you're trying to achieve. I've always felt that was a big NO NO, but you have me 2nd guessing myself.
from editorconfig-vscode.
Closing, as there has been no responses.
from editorconfig-vscode.
Related Issues (20)
- Space indent size is not working in VSCode version 1.74 HOT 3
- after restart vscode, the opened file in view is not work at the beginning HOT 1
- `indent_size` overrides `tab_size` for tab characters HOT 2
- VSCode Makefile `spaces` not converted to `tab` on save HOT 1
- editoconfig doesn't work on mac HOT 2
- `insert_final_newline = false` not working HOT 6
- editorconfig was forcing up changes
- Feature request: `trim_trailing_whitespace` only on modified lines
- csharp_new_line_before_open_brace not working
- Feature request: Ability to set a .editorconfig to use
- Plugin is disabled when using an SSH FS workspace
- It is non-obvious when editorconfig is overriding my chosen tab/indent settings
- auto input enter
- Removes spaces in template literal strings (JS/TS)
- EditorConfig doesn't work well in VSCode (in specific files) HOT 1
- Feature request: Disable automatic cursor transfer when adding the last line. HOT 3
- Impossible to manually change indent style/size HOT 1
- insert_final_newline will open all files when using `Search & Replace`
- recoil doesn't work HOT 1
- cursor jumps to next line while writing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from editorconfig-vscode.