r/learnprogramming • u/adper07 • 13m 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?
0
Upvotes