On Sat, Apr 01, 2017 at 11:45:17AM +0200, Harald Welte wrote:
I'm still fine with the Linux kernel coding style
for most parts, but I
think we could consider allowing longer lines.
The vim indenting rules help a great deal with breaking up lines[1], but
particularly when strings or function argument definitions are involved, it's
still annoying. There is no actual reason to choose 80 chars anymore. With the
osmo-gsm-tester code I'm working on these days, I find myself not strictly
enforcing the 80 characters rule, because it's annoying more than helping.
Just checked, the default way my terminals are arranged and configured ends up
in 105 characters of line width (two terminals side-by-side in a tiling wm,
with a font roughly ten times the size that Harald uses).
When I scale down one font size, I can fit 119... but...
My purely self-centered vote would be 100 chars -- or 105 ;)
I guess even if we allow 120, most lines would stay within 100?
A post some time last year pointed at a ruleset using 120.
With debug log output lines I would gladly allow "any" line width, though.
Following the category and level is a nice and descriptive string, which almost
always needs to be broken up without really serving code readability.
What do people generally think here?
+1 ("+20")
~N
[1] ~/.vimrc:
if has("autocmd")
augroup ccmds
autocmd!
autocmd FileType c set cin isk=a-z,A-Z,48-57,_
cino=>1s,e0,f0,{0,}0,=1s,t0,+1s,c3,(0,u0,\ 0,:0
autocmd FileType cpp set cin isk=a-z,A-Z,48-57,_
cino=>1s,e0,f0,{0,}0,=1s,t0,+1s,c3,(0,u0,\ 0,:0
augroup END
endif
" useful: 'visual'-select a long line and hit gw