Autor: Didier Kryn Datum: To: dng Betreff: Re: [DNG] Line length
Le 07/01/2025 à 14:19, nick a écrit : > I have an interesting system for dealing with long lines in source
> code, that also sometimes brings me into conflict with colleagues.
> They often want to start continuation lines with extra indents and
> often it is context dependent, e.g. they do:
> void this_is_a_long_function(int a, int b,
> int c, int d);
> where "int a" and "int c" are aligned by putting loads of spaces. I do
> not do it that way. What I do is, if something in parentheses (or
> braces or whatever) must be broken then each item inside has to be on
> its own line:
> void this_is_a_long_function(
> int a,
> int b,
> int c,
> int d
> );
Emacs, and I bet every reasonable text editor, has "language modes"
which indent for you with built-in syntax knowledge, wether C, Ada,
HTML, SVG, XML, Bash, Makefile, PostScript and certainly much more than
one single person can imagine.
In Emacs, it is tricky to disable these modes -- and why would you?
-- but you can define the tabulation length.