Tab policy, formatting and editors


#1

Most of the file I’ve been working on have mixed tab and space, which is annoying. The style guide states that “Indentation is 4 spaces”, so some people must not have their editor setup properly. There’s also a bunch of extra whitespace at the end of lines and some blank lines have indentation with them. These aren’t really “style” problem, but it can get annoying with git and an editor that strips them automatically.

I’m also wondering if anyone is using an automated formatter. I know Code::Blocks has a plugin for formatting, but I haven’t seen any configuration in the project. I’ve seen some formatter implementation online for Lua, is anyone using one?

And last, which editor are you guys using for coding C++ and Lua? I’m personally using Atom. I want to know because if I’m to bring an automated formatter (for C++ and Lua), might as well make sure it’s properly integrated with everyone’s editor of choice. Or it might just be a command-line tool (like for Lua).


#2

I use sublime, and I occasionally commit standalone whitespace fixes, as that bothers me too, so feel free to do the same.

I don’t think anyone will have a problem with commits that include whitespace fixups along with actual content, so you can go ahead with that too.


#3

for lua , I use notepad++ and I have it set up that a tab creates four spaces, for c++ I use codeblocks.