[PATCH v2 1/4] clang-format: should format with 2 space and do not usage tab

罗勇刚(Yonggang Luo) luoyonggang@gmail.com
Wed Jun 21 18:42:46 GMT 2023


On Thu, Jun 22, 2023 at 2:36 AM Arsen Arsenović <arsen@gentoo.org> wrote:
>
> 罗勇刚(Yonggang Luo) via Libc-alpha <libc-alpha@sourceware.org> writes:
>
> >> Note vi defaults to 8 spaces to a tab too.
> >> I suspect the non-8 spaces are non-UNIX first editors. I know
> >> notepad++ defaults to 4 spaces but I changed the settings there to 8
> >> because I actually like 8 spaces to the tab idea; 4 seems too little.
> > That‘s why better always using space, so that different editor would
show
> > it consistence
> > I am using vscode.
>
> I agree that in a code style based on spaces, 'compressing' eight spaces
> to tabs makes little sense.
>
> The current problem of 'editors configure tabs to a non-standard value
> out of the box', however, might be solved by something like an
> EditorConfig file, assuming it's not desirable to change the code style
> to not compress tabs.
>
> I'm not aware of anything other than EditorConfig that's even remotely
> standard (or even cross-editor).
> --
> Arsen Arsenović

Yeap, EditorConfig file is supported for multiple editors, but this
clang-format file
is hard to be supported by the editor:)
Because it's formatted result are mixed tab and space

--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo


More information about the Libc-alpha mailing list