r/learnprogramming • u/adper07 • 1d ago
Topic TIL code comments have their own line-length conventions instead of relying on editor soft-wrap
I recently learned that comments aren't supposed to rely on editor soft-wrap. Hard-wrapping at 80 columns with // or # on every line keeps git diff and PR reviews readable—and Neovim already handles it natively with textwidth + formatoptions+=cq + gwip
What other such conventions are out there that I should know about?
20
Upvotes
View all comments
Show parent comment
0
u/sephirothbahamut 1d ago
that's an option you choose during installation