4 ms·
ME. My editor is set for "tab chars" because that's what I work with (I did not choose this). When I use that editor to make a quick PR to a project using space
by withinboredom 6y ago
ME. My editor is set for "tab chars" because that's what I work with (I did not choose this). When I use that editor to make a quick PR to a project using spaces, I have to press space a couple of times to indent. I'm not going to change my settings just to make a couple of line in a PR.
- fps_doug 6y agoI'm using vim with the detectindent script (with ugly hacks and enhancements)[1] for that, it gets this right most of the time if the source file isn't too short, including the number of spaces in case it's space-indented. [1] https://termbin.com/qzwzy https://termbin.com/qzwzy
- est31 6y agoPersonally, I'm a tab user in a language that does mostly spaces (Rust). My own projects use tabs but most projects I interact with use spaces. I had tabs in my editor for a long time and I would always either press the space button or change the editor's setting. Then I got sick of it and changed the editor's default. My own projects have an editorconfig file that my editor can read, setting it to tabs in the project's scope. The projects I contribute to usually don't have such a file, that's where the spaces-per-default setting comes in.
- tasuki 6y agoWhy not use editorconfig? https://editorconfig.org/ https://editorconfig.org/