Hi Filip, Thanks for your reply. But I'm not so familiar with VIM actually. Thus when I try the options listed there, nothing happened. (VSCODE is the IDE I'm using for development.)
And I notice that there is a `vimrc` in the `contrib` directory, I tried it too, but sadly, it didn't work for me. Maybe I configured vim in some wrong way. Thanks Hanke Zhang Filip Kastl <fka...@suse.cz> 于2024年4月30日周二 18:00写道: > > On Tue 2024-04-30 13:52:16, Hanke Zhang via Gcc wrote: > > Hi > > I'm trying to format my code in GCC style. > > > > But I don't know how to finish it. I try `indent` and > > `check_GNU_style.sh` in the `contrib` directory. But none of them seem > > to work well. > > > > So I wondered is there any official tools to do that? > > > > Thanks > > Hanke Zhang > > Hi Hanke, > > Not sure if this will help you but this is what I use: While writing code in > GCC style, I use the vim options listed here: > > https://gcc.gnu.org/wiki/FormattingCodeForGCC > > Then, before I submit a patch I run it through check_GNU_style.sh. This works > fine for me. > > Cheers, > Filip Kastl