3 ms·
And yet these visually impaired people apparently pleaded with the OP not to take away their tabs. Almost every program to edit text has a tab stop setting, bu
by dkersten 7y ago
And yet these visually impaired people apparently pleaded with the OP not to take away their tabs.
Almost every program to edit text has a tab stop setting, but only the most advanced dev tools allow you the same control over spaces. Anecdotally, I’ve been struggling to get emacs to indent a certain language correctly for me (I want it to use two spaces in a place where it only uses one, I’m not really an emacs person so figuring out how to fix it is too much effort for me), if I were to switch to tabs, that would be easy: just set the tab width and be done with it. I don’t have any experience with screen readers, but it would seem to me that they should have an easier time with tabs too.
- prepend 7y agoI wish the story had described the editors used by the two visually impaired coders. It seems odd that they are using an environment that doesn’t up/down convert easily. It mentioned they were forced to do this like it was a manual process. Free IDEs like VScode do this, and it works with screen readers. Although from the description of their screens with large fonts and wide resolutions, I don’t think they were using screen readers. Since the article is missing this bit, I can’t help that fear that all three would have benefited from knowing how to config editors to get around this problem.
- scrollaway 7y agoNo IDE I know of can reliably convert spaces to tabs in a display mode only (= without actually causing code changes).
- dkersten 7y agoAlso, not every space necessarily should be converted to tabs, especially if you follow the “tabs for indentation, spaces for alignment” mentality: you will want everything up to the indentation level converted but not everything after. I’m sure some editors can do this, but many also definitely can’t. Tabs just work, everywhere.
- organsnyder 7y agoThis seems like something that could be resolved with a couple of git hooks: post-merge: Reformat code based on local developer preference. pre-commit: (1) Reformat code back to repository standard. (2) Revert changes that are solely whitespace-related. I'm not aware of a tool that would do the last step automatically, but it doesn't seem like it would be too hard to implement. And perhaps (I haven't checked) git has a built-in config option to alter how it behaves for whitespace-only changes?
- colordrops 7y agoThere is no need to convert though. Vim for instance can work with spaces as if they were tabs.
- prepend 7y agoI’ve had success with vscode converting spaces to tabs and vice versa between open and save. Knock on wood, I haven’t had it bungle any code. I do this because some projects like tabs, some like 2 spaces, some like 4 spaces and I like coding in a particular way that’s independent of the particular projects.