5 ms·
“participants all keep their own custom key bindings, packages, and themes.” what happens when two different people editing the same document have two differen
by liamdanielduffy 9y ago
“participants all keep their own custom key bindings, packages, and themes.”
what happens when two different people editing the same document have two different settings for # spaces per tab character? whose takes precedence? (Or would there be a possibility of inconsistent spacing depending on who is adding a tab?)
- have_faith 9y agoDefaulting to whatever the document is currently using would be sane?
- hobofan 9y agoThe document isn't "using" anything, since a document is a passive object. Unless you have something like vim modelines where you configure it at the top of the file like `/* vim: set tabstop=8:softtabstop=8:shiftwidth=8:noexpandtab */ `, the document itself doesn't know anything about how things _should_ be (which is the important part).
- grumblestumble 9y agoan opened document inside an editor is absolutely aware of this, and this is what you're collaborating on. almost all IDEs support EditorConfig, which makes standardizing on things like that across teams trivial.
- llimllib 9y agoI would guess that tab -> spaces happens locally, and then the spaces are what's sent over the wire. So it would be whoever inserted the tab. (What other possibility could there be?)
- MsMowz 9y agoWhy would spaces be sent over the wire?
- RussianCow 9y agoWhy wouldn't they be? How else would you envision indentation working?
- thedaniel 9y agoWell, one of the people in the scenario uses tab characters, not spaces.
- hobofan 9y agoWhy would someone do that? ducks
- spinningarrow 9y agoBecause indentation is subjective (and is different from alignment)
- dragonwriter 9y agoIf it is displayed spaces per tab character, then there is no conflict in the file but the appearance should be different to different viewers. If it is space characters replacing a tab keypress, then the spaces in the document should reflect the conversion ratio of the user that typed the tab.
- darkerside 9y agogit and other VCS seem to manage this problem just fine