4 ms·
My editor automatically converts [TAB] to four spaces. Works just fine for me.
by sdoering 13y ago
My editor automatically converts [TAB] to four spaces. Works just fine for me.
- raverbashing 13y agoAnd? Every editor can do it, I'm not complaining about pressing the space bar 4 times. I'm complaining about the appearance of code indented with 4 spaces.
- redwall_hp 13y agoWell, it shouldn't be a problem if you keep your source files clean and properly use tabs for indentation. Then everyone can set their editor to render tabs at their desired width, whether it's 2, 4, or 8 spaces. It's ludicrous that these space-wielding heretics (to borrow from the kernel style guide) are keeping everyone from having that.
- klibertp 13y agoEvery editor, or at least every good editor for programmers, can convert 4 (or whatever) spaces to tabs. If it bothers you that much, you can set up your editor so that it tabifies files when opening them and untabifies when saving. This way you won't even know if the file used spaces or tabs - and that's how it should be. In short: configure your editor to display to your tastes and save to whatever style guide you use in your organization. Problem solved.
- sesqu 13y agoYou might be shocked by how many editors can't convert indentation spaces to tabs. You might also be surprised by how many source files with indentation spaces have off-by-one indentation errors.
- Shorel 13y ago> You might also be surprised by how many source files with indentation spaces have off-by-one indentation errors. I will add that to my list of arguments against using spaces for indentation. It is so true.
- MichaelMoser123 13y agoUps. good luck then; that is bound to conflict with other editors; I think the Visual studio editor (or eclipse?) used to have 4 characters for tabs, if everybody is on Visual studio then you are fine. Of course if everybody in the shop has the same editor / editor settings then life is easier. vim has 8 spaces for tabstop and that's what its docs say: "Note: Setting 'tabstop' to any other value than 8 can make your file appear wrong in many places (e.g., when printing it)."