git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/4] editorconfig: set maximum line length to 120 characters

From
Justin Tobler <jltobler@gmail.com>
Date
Jun 27, 2025, 15:12 UTC
Message-ID
<4xcovwt5f2garsngqtzzcrn7755in4xkq6zxxk5smeo4d2vfp4@l7cqb2lizf65>
In-Reply-To
<CAOLa=ZR_ZhjxYgN4pZsjOuC52PZjGMCzLJVZbwGQb=Q9W-0HSQ@mail.gmail.com>
On 25/06/27 01:51AM, Karthik Nayak wrote:
Show 27 quoted lines
> Justin Tobler <jltobler@gmail.com> writes:
> 
> > On 25/06/25 06:43PM, Karthik Nayak wrote:
> >> As per 'Documentation/CodingGuidelines', we try to keep to at most 80
> >> characters per line. However, there are often certain cases where we
> >> extend this for the sake of readability.
> >>
> >> Add a maximum limit of 120 characters to the '.editorconfig'. This means
> >> that if an individual line exceeds 120 characters, the editor will wrap
> >> that line. This provides a lot wiggle room over the recommended 80
> >> character limit.
> >
> 
> Hello Justin,
> 
> > I frequently use the format operator in vim to reformat entire blocks of
> > text and it is commonly configured to use `max_line_length` from an
> > `.editorconfig` file to know when to wrap lines. Changing the value to
> > 120 would cause my editor to prefer 120 character lines when
> > reformatting, which I would personally not like.
> >
> 
> It would only wrap lines longer than 120 columns. Currently editorconfig
> doesn't wrap any line length. So we're essentially saying, any line
> above 120 is not something we want to accept and hence wrap. This
> doesn't mean that shorter lines will be combined together. Wouldn't this
> be better than the current situation?

When `max_line_length` is set in a ".editorconfig" file, in my vim editor it overrides the `textwidth` configuration which was already set to 80 by default. So changing to 120 would change line wrapping behavior for me at least. I could disable using the ".editorconfig", but I would prefer to avoid doing that :)

-Justin
Previous: Karthik NayakNext: Karthik Nayak
Message 9 of 36 in “clang-format: modify rules to reduce false-positives”
  1. 0/4 clang-format: modify rules to reduce false-positivesKarthik Nayak, Jun 25, 2025
  2. 1/4 editorconfig: set maximum line length to 120 charactersKarthik Nayak, Jun 25, 2025
  3. Junio C HamanoJun 25, 2025
  4. Karthik NayakJun 26, 2025
  5. Junio C HamanoJun 26, 2025
  6. Karthik NayakJun 27, 2025
  7. Justin ToblerJun 26, 2025
  8. Karthik NayakJun 27, 2025
  9. Justin ToblerJun 27, 2025
  10. Karthik NayakJun 30, 2025
  11. 2/4 clang-format: set 'ColumnLimit' to 0Karthik Nayak, Jun 25, 2025
  12. 3/4 clang-format: add 'RemoveBracesLLVM' to the main configKarthik Nayak, Jun 25, 2025
  13. 4/4 meson: add rule to run 'git clang-format'Karthik Nayak, Jun 25, 2025
  14. Justin ToblerJun 26, 2025
  15. Karthik NayakJun 27, 2025
  16. Junio C HamanoJun 27, 2025
  17. Karthik NayakJun 30, 2025
  18. Junio C HamanoJun 30, 2025
  19. 0/3 clang-format: modify rules to reduce false-positivesKarthik Nayak, Jun 30, 2025
  20. 1/3 clang-format: set 'ColumnLimit' to 0Karthik Nayak, Jun 30, 2025
  21. 2/3 clang-format: add 'RemoveBracesLLVM' to the main configKarthik Nayak, Jun 30, 2025
  22. 3/3 meson: add rule to run 'git clang-format'Karthik Nayak, Jun 30, 2025
  23. Patrick SteinhardtJul 1, 2025
  24. Karthik NayakJul 1, 2025
  25. Junio C HamanoJul 1, 2025
  26. Toon ClaesJul 1, 2025
  27. Karthik NayakJul 1, 2025
  28. Patrick SteinhardtJul 2, 2025
  29. Junio C HamanoJun 30, 2025
  30. Toon ClaesJul 1, 2025
  31. Karthik NayakJul 1, 2025
  32. Junio C HamanoJul 1, 2025
  33. 0/3 clang-format: modify rules to reduce false-positivesKarthik Nayak, Jul 2, 2025
  34. 1/3 clang-format: set 'ColumnLimit' to 0Karthik Nayak, Jul 2, 2025
  35. 2/3 clang-format: add 'RemoveBracesLLVM' to the main configKarthik Nayak, Jul 2, 2025
  36. 3/3 meson: add rule to run 'git clang-format'Karthik Nayak, Jul 2, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.