4 ms·
Thanks! Sorry for asking this, but why the strange (to me) indent?
by koide 14y ago
Thanks! Sorry for asking this, but why the strange (to me) indent?
- jpgvm 14y ago8 spaces? Probably because this is similar to the Linux kernel programming style. Many of us learnt C from the kernel or projects that follow it's coding style.
- lsiebert 14y agoAssuming you mean the code on github, I use tabs for indentation in vim, but have tabstop and setwidth set to 2. So if the code has 8 spaces, that is github or the browser. Feel free to make a pull request, or I can try to fix it (though I am kinda focused on my portfolio for internship applications atm). Should be a simple regex though.
- mst 14y agoperl -pi -e 's/^(\t+)/" " x length($1)/e' recurse.c seems to do the trick; vary the number of spaces inside the "" to taste.