3 ms·
> I'll either have to invoke horizontal scrolling or I'll have a bunch of wasted space if you are using different size tabs from me. So change your tab size? T
by dTal 9y ago
> I'll either have to invoke horizontal scrolling or I'll have a bunch of wasted space if you are using different size tabs from me.
So change your tab size? That's true if you have a different sized monitor, no matter what the tab size. That's... kind of the point of using tabs.
>I've come to the conclusion that the only sensible tab width is 8, since that works everywhere including in tools where it isn't practical to set (eg. less).
Pass -x[size] to less or put it in the LESS environment variable to make it default. You can also type it in while less is running.
Also, what do you mean "works"? The world doesn't explode if you view a file with a different tab size than it was created with. Again, kind of the point...
- rlpb 9y ago> Also, what do you mean "works"? The world doesn't explode if > you view a file with a different tab size than it was created > with. Again, kind of the point... It does, as I demonstrate in my quote of you above. Try reading source code like that. The only sensible way of reading source code is by viewing it with at the same overall window width in which the author wrote it. Viewing at a different tab size destroys this. > Pass -x[size] to less or put it in the LESS environment variable to make it default. You can also type it in while less is running. Except that I need to figure out the most appropriate tab size to use on a per-file-author basis if "variable tabs" were used, so this doesn't work because I get the problem as described above.
- pyre 9y ago> So change your tab size? That's true if you have a different sized monitor, no matter what the tab size. That's... kind of the point of using tabs. I think that the point was that if your IDE displays tabs as 8 spaces, and you read code written by someone that sets their IDE to display tabs as 2 spaces, then the line lengths will display longer in your IDE. It "just works" when the writer has configured longer tabs than the reader, but not necessarily in the opposite direction. > Also, what do you mean "works"? The world doesn't explode if you view a file with a different tab size than it was created with. Again, kind of the point... One example: enforced line-length limits. If you are wrapping at 80 characters with tabs set to 2-spaces, you will display a longer than 80 characters when viewing with tabs set to 8-spaces.
- notacoward 9y ago> So change your tab size? Then open another file, change the tab size again. Or start setting up macros/extensions/whatever to remember or auto-detect settings. This flexibility to have different developers view the same code with different tab widths comes at a cost. Many of those same developers would rather not keep paying the cost, and would prefer that code written by many people fit in their editor/IDE windows and look consistent without any special settings.