Open kostrzewa opened 11 years ago
who is using tabs?
I've found a few of your routines which had a mixture of spaces and tabs. See for instance ndrat_monomial.c line 104. There are three tabs to begin with and then five spaces.
In other instances horizontal aligment is really bad as a consequence.
Im always using xemacs for indentation, so no idea where the tabs come from. Usually xemacs does it with spaces.
How about we create an astyle file and commit it? There's probably going to be instances of broken indentation conventions afterwards, but it'll be easy to fix at least. With SVN, there used to be the issue that any file visited by astyle would be marked as modified, but it shouldn't be an issue with git.
Now that we have a .clang-format
file in master
, this issue is resolved, right?
We could add a local .vimrc
which sets a couple of options such that the local style does not deviate much from what clang-format
would give us:
set shiftwidth=2
set tabstop=2
set softtabstop=2
set colorcolumn=100
Then developers would have to have set exrc
in their ~/.vim/vimrcin order to use the project
.vimrc`.
we have a .clang-format
file in master
?
remark: I'm personally often using emacs
.
My mistake, the .clang-format
is only in qphix_devel
.
I'll add that .vimrc
then locally for me only, no need to pollute the repository.
but it would be good to have one for master
as well!
.clang-format
will be merged with qphix
I would prefer to not have the tmLQCD code-base take over my vim settings.
I've been wanting to bring this up for a while now because it makes code much easier to read for everyone. Could we please agree to consistent rules for indendation? Personally, I'm partial to 2 spaces, no tabs. It is a sufficiently big indent to clearly separate levels while beeing conservative in regards to horizontal space. With a good editor using spaces instead of tabs is really not annoying at all.
The only drawback (in my opinion) comes from editing makefiles where one needs to use real tabs for the rules of a target. However, these can be produced by entering "verbatim mode" in VI(M), for instance.