On 09/05/2014 12:22 AM, Bernhard Reutner-Fischer wrote:
Not sure from whom i borrowed this, perhaps even from you richi, but the
gcc_style.vim pasted in the mail below seems to be floating around ;)
https://gcc.gnu.org/ml/gcc-patches/2012-12/msg01228.html
Nice! Interestingly enough this gives same results with my settings
(or at least I was not able to spot any difference).
Formatting of comments is still different though (mine are wrapped at
80-th column).
Now I don't quite like the idea of plugin:
* .local.vimrc setting is more compatible with what we already have for
Emacs
* gcc_style.vim won't work for new files (it requires GCC license agreement)
* gcc_style.vim enables GNU style globally, for all projects
IMHO localrc plugin is widespread enough that we can rely on it.
This automatically applies the "gcc style" if the first 25 lines of the
file being opened contains the syndicated "This file is part of GCC" so
should transparently not set GNU style on foreign stuff like sanitizer.
But as I mentioned also disables formatting for all new files.
-Y