Infinite-Chess / infinitechess.org

Infinite Chess Web Server
https://www.infinitechess.org
GNU Affero General Public License v3.0
175 stars 40 forks source link

Using tabs instead of spaces #258

Open Heinrich-XIAO opened 9 hours ago

Heinrich-XIAO commented 9 hours ago

I think we should use tabs instead of spaces as tabs can look different based on preferences. In this case, consistency is not ideal as different programmers want different tab sizes. I use 2 spaces per tab while the code in the repo all use 4 spaces per "tab".

Heinrich-XIAO commented 9 hours ago

Github also renders tabs like this, so consistency between tabs and spaces is important. image

Heinrich-XIAO commented 8 hours ago

Github allows you to change tab size, but this only works when they are real \t characters image

Naviary2 commented 6 hours ago

Valid arguments.

When you say tabs can look different depending on your preferences, are you only referring to the length of tabs, or are there additional customizations for tabs?

I do think the way github renders tabs is a good reason to switch, but you aren't actually having to hit your space bar 4 times every line are you? My tab auto-inserts 4 spaces.

Heinrich-XIAO commented 6 hours ago

probably only the length on most editors, but in vim-like editors, I'm pretty sure I can change colour as well.

Heinrich-XIAO commented 6 hours ago

but you aren't actually having to hit your space bar 4 times every line are you? My tab auto-inserts 4 spaces.

Here in neovim, I do have to slam space unless I configure tab to do that for me, but I can't because all of my other projects use \t.