Re: [PATCH 2/2] streamline_config.pl: Add softtabstop=4 for vim users

From: Steven Rostedt
Date: Thu Mar 25 2021 - 09:51:27 EST


On Thu, 25 Mar 2021 15:20:13 +0900
Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:

>
> The root cause of inconsistency is that
> you mix up space-indentation and tab-indentation.
> I do not know if it is a standard way either.

This is the default way emacs has edited perl files for as long as I can
remember (back to 1996). It became my standard of editing perl files just
because of that. For everything else, I use tabs.

>
> For example, scripts/checkpatch.pl uses only tabs,
> which I think is more robust.

Probably because Joe probably uses vim ;-)

>
> Unfortunately, we do not have standardized indentation style
> for scripts yet, and people can go in any direction.
>
> The editorconfig patch [1] proposed to always use 4-space
> indentation for *.pl files.
> (that is, do not replace 8 spaces with a tab).

I rather have all tabs, or the tab and spaces. I find 8 spaces to be a
waste of memory and disk space.

>
> I do not know whether the kernel will adopt .editorconfig or not,
> but if that patch is applied, your 1/2 will be a step backward.

My 1/2 only made it consistent, as the original code had the tab/spaces mix
and just a few lines that were modified by others broke it by adding all
spaces.

>
> My got-feeling is, you will never reach the goal as long as
> you adopt a strange indentation style, which is obscure
> to other contributors.

I'm guessing this is not strange to other perl developers who uses emacs.

>
> Not all people use vim.

I don't use it either. I was trying to make vim match emacs. Of course for
those that use something else, it wont help. I'm curious, what's your main
editor that you use?

> I am not interested in 1/2 either.

OK.

>
> If you insist on this patch set, apply it to your tree
> and send a pull request by yourself.

I'm fine with that.

>
>
> [1]: https://lore.kernel.org/lkml/20200703073143.423557-1-danny@xxxxxxxxxxx/

Thanks for the link.

-- Steve